Courses
Tutorials
Practice
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
37.4K+ articles
Java
10.8K+ articles
Misc
8.8K+ articles
Java-Functions
4.2K+ articles
Java - util package
1.6K+ articles
Java-Collections
1.1K+ articles
Java-lang package
417+ articles
Java-Strings
240+ articles
Java-I/O
75+ articles
Java-keyword
20+ articles
Java-Library
71 posts
Recent Articles
Popular Articles
LinkedHashSet contains() Method in Java with Examples
Last Updated: 18 November 2021
In Java, LinkedHashSet class contains methods known as contains() which is used to return true if this set contains the specified element otherwise false.Syntax:public boo...
read more
Java
Java-Collections
Java-Library
Java - util package
Java-Functions
java-LinkedHashSet
LinkedHashSet clear() method in Java with Examples
Last Updated: 12 October 2018
The clear() method of java.util.LinkedHashSet class is used to remove all of the elements from this set. The set will be empty after this call returns.Syntax:public void c...
read more
Java
Java-Collections
Java-Library
Java - util package
Java-Functions
java-LinkedHashSet
ArrayList ensureCapacity() Method in Java with Examples
Last Updated: 10 December 2024
In Java, the ArrayList.ensureCapacity() method is used to increase the internal capacity of an ArrayList to ensure that it can hold a specified minimum number of elements....
read more
Java
Java-Collections
Java-Library
Java - util package
Java-Functions
Java-ArrayList
Scanner nextLong() method in Java with Examples
Last Updated: 12 October 2018
The nextLong(radix) method of java.util.Scanner class scans the next token of the input as a long. If the translation is successful, the scanner advances past the input th...
read more
Java
Java-Library
Java - util package
Java-Functions
Scanner nextInt() method in Java with Examples
Last Updated: 12 October 2018
The nextInt(radix) method of java.util.Scanner class scans the next token of the input as a Int. If the translation is successful, the scanner advances past the input that...
read more
Java
Java-Library
Java - util package
Java-Functions
Scanner nextByte() method in Java with Examples
Last Updated: 12 October 2018
The nextByte(radix) method of java.util.Scanner class scans the next token of the input as a Byte. If the translation is successful, the scanner advances past the input th...
read more
Java
Java-Library
Java - util package
Java-Functions
Scanner nextBigInteger() method in Java with Examples
Last Updated: 12 October 2018
The nextBigInteger(radix) method of java.util.Scanner class scans the next token of the input as a BigInteger. If the translation is successful, the scanner advances past ...
read more
Java
Java-Library
Java - util package
Java-Functions
Scanner nextDouble() method in Java with Examples
Last Updated: 12 October 2018
The nextDouble() method of java.util.Scanner class scans the next token of the input as a Double. If the translation is successful, the scanner advances past the input tha...
read more
Java
Java-Library
Java - util package
Java-Functions
Scanner nextBoolean() method in Java with Examples
Last Updated: 12 October 2018
The nextBoolean() method of java.util.Scanner class scans the next token of the input as a Boolean. If the translation is successful, the scanner advances past the input t...
read more
Java
Java-Library
Java - util package
Java-Functions
Scanner nextBigDecimal() method in Java with Examples
Last Updated: 12 October 2018
The nextBigDecimal() method of java.util.Scanner class scans the next token of the input as a BigDecimal. If the next token matches the Decimal regular expression defined ...
read more
Java
Java-Library
Java - util package
Java-Functions
Scanner nextLine() method in Java with Examples
Last Updated: 12 October 2018
The nextLine() method of java.util.Scanner class advances this scanner past the current line and returns the input that was skipped. This function prints the rest of the c...
read more
Java
Java-Library
Java - util package
Java-Functions
Scanner locale() method in Java with Examples
Last Updated: 12 October 2018
The locale() method of java.util.Scanner class returns this scanner's locale.Syntax: public Locale locale()Parameters: The function does not accepts any parameter.Return V...
read more
Java
Java-Library
Java - util package
Java-Functions
Which Java libraries are useful for competitive programming?
Last Updated: 10 May 2022
Java is one of the most recommended languages in competitive programming (please refer a previous article for more details)Java Collection framework contains lots of conta...
read more
Misc
Java
Competitive Programming
DSA
Java-Collections
Java-Library
interview-preparation
Java-Competitive-Programming
Java Exercises - Basic to Advanced Java Practice Programs with Solutions
Last Updated: 02 January 2025
Looking for Java exercises to test your Java skills, then explore our topic-wise Java practice exercises? Here you will get 25 plus practice problems that help to upscale...
read more
Java
Java Programs
Output of Java Program
Java-Library
Java-Output
Java-I/O
java-basics
Java-Object Oriented
Java-Strings
Java-Arrays
Java-Data Types
Java-Functions
How to Copy Key-Value Pairs from One TreeMap to Another in Java?
Last Updated: 06 February 2024
In Java, a TreeMap is a Map implementation that stores key-value pairs in a red-black tree structure. It allows insertions and deletions of key-value pairs due to its tree...
read more
Java
Java Programs
Picked
Java-Collections
Java-Library
java-TreeMap
Java Examples
1
2
3
4
5
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !