Skip to content
Courses
DSA to Development
Get IBM Certification
Newly Launched!
Master Django Framework
Become AWS Certified
For Working Professionals
Interview 101: DSA & System Design
Data Science Training Program
JAVA Backend Development (Live)
DevOps Engineering (LIVE)
Data Structures & Algorithms in Python
For Students
Placement Preparation Course
Data Science (Live)
Data Structure & Algorithm-Self Paced (C++/JAVA)
Master Competitive Programming (Live)
Full Stack Development with React & Node JS (Live)
Full Stack Development
Data Science Program
All Courses
Tutorials
Data Structures & Algorithms
ML & Data Science
Interview Corner
Programming Languages
Web Development
CS Subjects
DevOps And Linux
School Learning
Practice
Build your AI Agent
GfG 160
Problem of the Day
Practice Coding Problems
GfG SDE Sheet
Contests
Accenture Hackathon (Ending Soon!)
GfG Weekly [Rated Contest]
Job-A-Thon Hiring Challenge
All Contests and Events
DSA
Practice Problems
Python
C
C++
Java
Courses
Machine Learning
DevOps
Web Development
System Design
Aptitude
Projects
Sign In
▲
Similar Topics
Java
10.1k+ articles
Java-Functions
4.1k+ articles
Java Programs
2.1k+ articles
Misc
2.1k+ articles
Java-Collections
1.1k+ articles
java-basics
310+ articles
java-stream
130+ articles
Java 8
100+ articles
Java-Stack
56 articles
Java-LinkedBlockingDeque
49 articles
Java - util package
1.5k+ posts
Popular Articles
Recent Articles
Java HashMap getOrDefault() Method
Last Updated: 07 April 2025
When we work with Java's HashMap, one common problem occurs that is dealing with missing keys. If we try to fetch a value for a key that doe
...read more
Java
Java-Collections
Java - util package
Java-Functions
Java-HashMap
Picked
Optional ofNullable() method in Java with examples
Last Updated: 30 July 2019
The ofNullable() method of java.util.Optional class in Java is used to get an instance of this Optional class with the specified value of th
...read more
Java
Java - util package
Java-Functions
Java-Optional
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 fu
...read more
Java
Java-Library
Java - util package
Java-Functions
Similar Topics
Java
10.1k+ articles
Java-Functions
4.1k+ articles
Java Programs
2.1k+ articles
Misc
2.1k+ articles
Java-Collections
1.1k+ articles
java-basics
310+ articles
java-stream
130+ articles
Java 8
100+ articles
Java-Stack
56+ articles
Java-LinkedBlockingDeque
49+ articles
Function Interface in Java
Last Updated: 16 April 2025
The Function Interface is a part of the java.util.function package that has been introduced since Java 8, to implement functional programmin
...read more
Java
java-basics
Java - util package
Java-Functions
java-interfaces
Java 8
Java 8 | Consumer Interface in Java with Examples
Last Updated: 17 September 2021
The Consumer Interface is a part of the java.util.function package which has been introduced since Java 8, to implement functional programmi
...read more
Java
java-basics
Java - util package
Java Programs
Java 8
HashMap containsKey() Method in Java
Last Updated: 04 January 2025
The java.util.HashMap.containsKey() method is used to check whether a particular key is being mapped into the HashMap or not. It takes the k
...read more
Java
Java-Collections
Java - util package
Java-Functions
Java-HashMap
Stream anyMatch() in Java with examples
Last Updated: 06 December 2018
Stream anyMatch(Predicate predicate) returns whether any elements of this stream match the provided predicate. It may not evaluate the predi
...read more
Misc
Java
Technical Scripter
Java - util package
Java-Functions
java-stream
Java-Stream interface
Stream filter() in Java with examples
Last Updated: 09 July 2024
Stream filter(Predicate predicate) returns a stream consisting of the elements of this stream that match the given predicate. This is an int
...read more
Java
Technical Scripter
Java - util package
Java-Functions
java-stream
Java-Stream interface
Stream flatMap() in Java with examples
Last Updated: 11 March 2025
Stream flatMap(Function mapper) returns a stream consisting of the results of replacing each element of this stream with the contents of a m
...read more
Java
Technical Scripter
Java - util package
java-stream
Stream.reduce() in Java with examples
Last Updated: 28 August 2024
In Java, the Stream.reduce() method is used to perform a reduction on the elements of a stream using an associative accumulation function an
...read more
Java
Java - util package
Java-Functions
java-stream
Java-Stream interface
Java.util.Random.nextInt() in Java
Last Updated: 21 March 2025
Generating random numbers themselves has a good utility. Java provides a method Random.nextInt() which is the part of Random Class present i
...read more
Java
Java - util package
Vector Class in Java
Last Updated: 17 April 2025
The Vector class in Java implements a growable array of objects. Vectors were legacy classes, but now it is fully compatible with collection
...read more
Java
Java-Collections
Java - util package
Java-Vector
Hashtable in Java
Last Updated: 02 January 2025
Hashtable class, introduced as part of the Java Collections framework, implements a hash table that maps keys to values. Any non-null object
...read more
Java
Java-Collections
Java - util package
HashTable
Java-HashTable
TreeSet in Java
Last Updated: 17 March 2025
TreeSet is one of the most important implementations of the SortedSet interface in Java that uses a Tree(red - black tree) for storage. The
...read more
Java
Java-Collections
Java - util package
java-treeset
Array vs ArrayList in Java
Last Updated: 24 March 2025
In Java, an Array is a fixed-sized, homogenous data structure that stores elements of the same type whereas, ArrayList is a dynamic-size, pa
...read more
Java
Java-Collections
Java - util package
Java-Arrays
Difference Between
Java-ArrayList
Java-Array-Programs
Java-List-Programs
First
1
2
3
4
5
6
7
8
>>
Last
First
1
2
3
4
5
6
>>
Last
First
1
2
3
4
>>
Last
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 !