(Read this article on the blog)
Last updated on 2023/09/22 to include changes up to JDK 21.
This article is also available in Chinese by Alex Tan.
Since the release of version 8, up to ver… Read More
Table of ContentsWhy use Java packages?How do Java packages work?Default packageCreating and Organizing Packages in JavaCreating a PackageOrganizing PackagesDefault PackageAccessing classes… Read More
In this post, I will be sharing the frequently asked top 10 Java generics interview questions and answers for experienced professionals. Generics was introduced in Java 5. Generics is used f… Read More
A functional interface in Java is an interface with only one abstract method. A functional interface is also known as SAM type where SAM stands for (Single Abstract Method). An example of… Read More
'TypeSpec.Builder.addSuperinterface()' is used to specify the interfaces implemented by this class. ExampleTypeSpec myListSpec = TypeSpec.classBuilder("MyList").superclass(ArrayList.c… Read More
Java Advanced & Java Part 1 Advanced AssessmentQ1. Which of the following statements are correct?Answer: Strings in java are immutable. &nbs… Read More
Scala packages are similar to Java packages with few differences. In Scala, a. a single source file have contributions to multiple packages. b. &nb… Read More
What is Generics in Java?
Generics in Java was introduced back in 2004 as a new feature of the Java programming language and was part of the JDK 5 release. It is most widely used along with… Read More
Today, I am sharing Java SCJP/OCJP Written Test Interview Questions with answers,earlier i have shared SCJP/OCJP Interview Questions part-I. In this page we will discuss more SCJP interview… Read More
Type Erasure is a process, where Java Compiler replaces type with its first bound if the type parameter is bounded, or Object if the type parameter is unbounded.Let me explain with an exampl… Read More