- 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
Maruthi Krishna has Published 951 Articles
![Maruthi Krishna](https://www.tutorialspoint.com/assets/profiles/119958/profile/60_3780337-1641548568.png)
Maruthi Krishna
298 Views
Since Java 7 the File.02s class was introduced this contains (static) methods that operate on files, directories, or other types of files.The createDirectory() method of the Files class accepts the path of the required directory and creates a new directory.ExampleFollowing Java example reads the path and name of the directory to be created, ... Read More
![Maruthi Krishna](https://www.tutorialspoint.com/assets/profiles/119958/profile/60_3780337-1641548568.png)
Maruthi Krishna
1K+ Views
Java provides certain classes called wrapper classes in the java.lang package. The objects of these classes wrap primitive datatypes within them.Using wrapper classes, you can also add primitive datatypes to various Collection objects such as ArrayList, HashMap etc. You can also pass primitive values over network using wrapper classes.ExampleLive Demoimport ... Read More
![Maruthi Krishna](https://www.tutorialspoint.com/assets/profiles/119958/profile/60_3780337-1641548568.png)
Maruthi Krishna
336 Views
An interface in Java is similar to class but, it contains only abstract methods and fields which are final and static.Just like classes you can extend one interface from another using the extends keyword. You can also extend multiple interfaces from an interface using the extends keyword, by separating the ... Read More
![Maruthi Krishna](https://www.tutorialspoint.com/assets/profiles/119958/profile/60_3780337-1641548568.png)
Maruthi Krishna
1K+ Views
To match a regular expression with the given string You need to:.Compile the regular expression of the compile() method of the Pattern class.Get the Matcher object bypassing the required input string as a parameter to the matcher() method of the Pattern class.The matches() method of the Matcher class returns true ... Read More
![Maruthi Krishna](https://www.tutorialspoint.com/assets/profiles/119958/profile/60_3780337-1641548568.png)
Maruthi Krishna
1K+ Views
The java.text.SimpleDateFormat class is used to format and parse a string to date and date to string.One of the constructors of this class accepts a String value representing the desired date format and creates SimpleDateFormat object. To parse/convert a string as a Date object Instantiate this class by passing desired format string.Parse ... Read More
![Maruthi Krishna](https://www.tutorialspoint.com/assets/profiles/119958/profile/60_3780337-1641548568.png)
Maruthi Krishna
6K+ Views
The getTime() method of the Date class retrieves and returns the epoch time (number of milliseconds from Jan 1st 1970 00:00:00 GMT0.ExampleLive Demoimport java.util.Date; public class Sample { public static void main(String args[]){ //Instantiating the Date class Date date = new Date(); ... Read More
![Maruthi Krishna](https://www.tutorialspoint.com/assets/profiles/119958/profile/60_3780337-1641548568.png)
Maruthi Krishna
2K+ Views
A temporal field is a field of date-time, such as month-of-year or hour-of-minute. These fields are represented by the TemporalField interface and the ChronoField class implements this interface.Following are the list of various temporal fields regarding date supported by the ChronoField class −FieldDescriptionALIGNED_DAY_OF_WEEK_IN_MONTHThis field represents the day of the week ... Read More
![Maruthi Krishna](https://www.tutorialspoint.com/assets/profiles/119958/profile/60_3780337-1641548568.png)
Maruthi Krishna
661 Views
A temporal field is a field of date-time, such as month-of-year or hour-of-minute. These fields are represented by the TemporalField interface and the ChronoField class implements this interface.Following are the list of various temporal fields regarding time supported by the ChronoField class −FieldDescriptionCLOCK_HOUR_OF_AMPMThis field represents the clock hour of a ... Read More
![Maruthi Krishna](https://www.tutorialspoint.com/assets/profiles/119958/profile/60_3780337-1641548568.png)
Maruthi Krishna
3K+ Views
In general, the elapsed time is the time from the starting point to ending point of an event. Following are various ways to find elapsed time in Java −The nanoTime() method returns the current time in nano seconds. To find the elapsed time for the execution of a method in ... Read More
![Maruthi Krishna](https://www.tutorialspoint.com/assets/profiles/119958/profile/60_3780337-1641548568.png)
Maruthi Krishna
6K+ Views
In general, the elapsed time or, execution is the time from the starting point to ending point of an event. Following are various ways to find elapsed time in Java −The currentTimeMillis() method returns the current time in milliseconds. To find the elapsed time for a method you can get ... Read More