- 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
Shriansh Kumar has Published 173 Articles
![Shriansh Kumar](https://www.tutorialspoint.com/assets/profiles/644826/profile/60_1575483-1682416785.jpg)
Shriansh Kumar
646 Views
Java provides different ways to copy files including the ‘File’, ‘FileInputStream’ and‘FileOutputStream’ classes. There are times when we need to take a backup, compress a file or share it with others. In these situations, copying that file becomes necessary. Weare going to explore the methods and classes that will help ... Read More
![Shriansh Kumar](https://www.tutorialspoint.com/assets/profiles/644826/profile/60_1575483-1682416785.jpg)
Shriansh Kumar
84 Views
Java provides different method calls techniques that we can use according to the need andscenario in our program. Here, methods mean a block of code that can be reused multipletimes to perform a single operation. It saves our time and also reduces the size of code.The method call is referred ... Read More
![Shriansh Kumar](https://www.tutorialspoint.com/assets/profiles/644826/profile/60_1575483-1682416785.jpg)
Shriansh Kumar
781 Views
The most frequent query asked by beginner programmers is that how are parameters passed in Java. Generally, the programming languages use pass by value and pass byreference for passing parameters to a method. However, Java does not support both approaches rather it uses pass by value to pass both primitive ... Read More
![Shriansh Kumar](https://www.tutorialspoint.com/assets/profiles/644826/profile/60_1575483-1682416785.jpg)
Shriansh Kumar
198 Views
To encapsulate or represent a primitive datatype within an object, Java provides theconcept of Wrapper classes. All eight wrapper classes are as follows Double, Float, Long, Integer, Short, Byte, Character, and Boolean. These classes have a variety of in-builtmethods that allows us to integrate primitives into their respective instances as ... Read More
![Shriansh Kumar](https://www.tutorialspoint.com/assets/profiles/644826/profile/60_1575483-1682416785.jpg)
Shriansh Kumar
83 Views
A string is a class in Java that stores a series of characters enclosed within double quotes.Those characters are actually String-type objects. The string class is available in the‘java.lang’ package. Suppose we have given a string and a positive integer ‘k’. Now, thejob is to print that string's first 'k' ... Read More
![Shriansh Kumar](https://www.tutorialspoint.com/assets/profiles/644826/profile/60_1575483-1682416785.jpg)
Shriansh Kumar
40 Views
TreeSet is a class of Java Collection Framework that implements the SortedSet Interface.It stores elements in ascending order and does not allow duplicate values therefore, theaccess and retrieval time becomes faster. Because of this excellent feature, TreeSet isfrequently used to store large amounts of information that need to be searched ... Read More
![Shriansh Kumar](https://www.tutorialspoint.com/assets/profiles/644826/profile/60_1575483-1682416785.jpg)
Shriansh Kumar
49 Views
TreeSet is a class of Java Collection Framework that implements the SortedSet Interface.It stores elements in ascending order and does not allow duplicate values therefore, theaccess and retrieval time becomes faster. Because of this excellent feature, TreeSet isfrequently used to store large amounts of information that need to be searched ... Read More
![Shriansh Kumar](https://www.tutorialspoint.com/assets/profiles/644826/profile/60_1575483-1682416785.jpg)
Shriansh Kumar
601 Views
TreeSet is a class of Java Collection Framework that implements the SortedSet Interface. Remember that it stores elements in ascending order and does not allow duplicate values. We need to stick with this condition while adding custom class objects to the TreeSet otherwise we will encounter a ClassCastException. Here, custom ... Read More
![Shriansh Kumar](https://www.tutorialspoint.com/assets/profiles/644826/profile/60_1575483-1682416785.jpg)
Shriansh Kumar
10K+ Views
Array is a linear data structure that is used to store a group of elements with similar datatypes. It stores data in a sequential manner. Once we create an array we can’t change its size i.e. it is of fixed length. Adding an element to a given array is a ... Read More
![Shriansh Kumar](https://www.tutorialspoint.com/assets/profiles/644826/profile/60_1575483-1682416785.jpg)
Shriansh Kumar
551 Views
Suppose we are in a situation where we need to generate random integer numbers within a specific range through Java programs. For the given scenario, there are two distinct ways available in Java. We can use either the Random class or random() method. Let’s discuss them in the next section. ... Read More