- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Samual Sam has Published 2492 Articles
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
66 Views
The ftp_login() function allows you to log in to the FTP connection.Syntaxftp_login(con, user_name, password);Parameterscon − The FTP connectionuser_name − The user name to log inpassword − The password to loginReturnThe ftp_login() function returns TRUE on success or FALSE and warning on failure.ExampleThe following is an example −Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
332 Views
Use the ‘b’ conversion character for month name in Java.Use the ‘m’ conversion character for month number in Java.Here, we are using Formatter and Calendar class, therefore import the following packages.import java.util.Calendar; import java.util.Formatter;The following is an example to display month name and number −Example Live Demoimport java.util.Calendar; import java.util.Formatter; public ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
57 Views
The ftp_mkdir() function is used to create a new directory on the FTP server.Syntaxftp_mkdir(con, dir);Parameterscon − The FTP connectiondir − The name of the directory to be createdReturnThe ftp_mkdir() function returns name of the directory on success, or FALSE on failureExampleThe following is an example that creates a new directory ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
179 Views
The method java.io.File.getAbsoluteFile() can be used to acquire the absolute filename path from a relative filename path in Java. This method requires no parameters. It returns the file that is defined by the path name.A program that demonstrates this is given as follows −Example Live Demoimport java.io.File; public class Demo { ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
109 Views
To work with SimpleDateFormat class in Java, import the following package.import java.text.SimpleDateFormat;Now, set the format with SimpleDateFormat(“m”) to display minutes.Format f = new SimpleDateFormat(‘”m”);Now, get the minutes in a string.String strMinute = f.format(new Date());The following is an example −Example Live Demoimport java.text.Format; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Calendar; public class Demo ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
100 Views
To get the element ordered first i.e. the first element in TreeSet, use the first() method.Create a TreeSet and add elements to it −TreeSet set = new TreeSet(); set.add("65"); set.add("45"); set.add("19"); set.add("27"); set.add("89"); set.add("57");Now, get the first element −set.first()The following is an example to get the element ordered first in ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
35 Views
The ftp_nb_fget() function downloads a file from the FTP server and saves it into an open file.Syntaxftp_nb_fget(con, open_file, server_file, transfer_mode, beg_pos);Parameterscon − The FTP connectionopen_file − The local data is stored here.server_file − The server file to download.transfer_mode − This is the transfer mode. The following are the possible values:- ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
690 Views
The method java.io.File.equals() is used to find if the two file names refer to the same File in Java. This method requires a single parameter i.e.the file object that is to be compared to the other file object. It returns if the file objects are same and false otherwise.A program ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
102 Views
Firstly, create a Formatter and Calendar object.Formatter f = new Formatter(); Calendar cal = Calendar.getInstance();Now display the current date and time. We have shown the date here in both lowercase and uppercase −f = new Formatter(); System.out.println(f.format("Date and Time (lowercase): %tc", cal)); f = new Formatter(); System.out.println(f.format("Date and Time (uppercase): ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
87 Views
The ftp_nb_put() function uploads a file to the FTP server.Syntaxftp_nb_put(con, remote_file, local_file, transfer_mode, beg_pos);Parameterscon − The FTP connectionremote_file − The file to upload tolocal_file − The local file path to uploadtransfer_mode − This is the transfer mode. The following are the possible values:- FTP_ASCII, or- FTP_BINARYbeg_pos − The position to ... Read More