Is it possible to write a Java program without using a class?
This post will examine the validity of the statement that “Every Java program must have at least one class.” and explore the possibility of writing a Java program without using a class.
Ace your Coding Interview
Get hired by top tech companies with our comprehensive interview preparation.
Get StartedThis post will examine the validity of the statement that “Every Java program must have at least one class.” and explore the possibility of writing a Java program without using a class.
This post will discuss how to implement a Triplet class in Java that can store three values of any type, using the Pair class provided by the Apache Commons Lang library.
This post will discuss how to concatenate two Java strings using the + operator, StringBuffer, StringBuilder, and concat() method provided by java.lang.String class.
This post will discuss how to convert an iterator to a list in Java.
This post will introduce IntSummaryStatistics class in Java, which collects statistics such as count of elements, the minimum and maximum sum, and the average of elements in an IntStream.
This post will discuss how to convert a char array to string in Java.
This post will discuss toList(), toSet(), and toMap() methods of Collectors class in Java 8 and above.
This post will discuss how to get Map’s key from the value in Java, where there is a 1:1 relationship between keys and values in the map, i.e., no two keys have the same value
Write a Java program to construct a set containing all elements of the specified set and in the same order as the original set. In other words, clone a set in Java. Assume there are no mutable objects in the set, and a shallow copy can be performed.
This post will discuss how to check if a string is empty or null in Java. Note that a string is empty if and only if its length is 0.
This post will discuss the usage of the double brace initialization technique in Java.
This post will discuss the difference between an array and ArrayList in Java.