Java is an Object-oriented, High-level and Secured Programming Language. Java is platform independent and portable programming language which means it can easily run in any computer.
What is JDK, JRE, and JVM in Java?
JDK: JDK stands for Java Development Kit. It is a software IDE ( Integrated Development Environment) which is used to develop software applications and Web applications using Java.
JRE: JRE stands for Java Runtime Environment. It contains a set of libraries and many other files use at runtime. It consists of a Set of software tools for developing Java applications.
JVM: JVM Stands for Java Virtual Machine. JVM allows executing byte code. JVM is available for many software and hardware platform. JVM is platform dependent.
What is a platform?
In computer field platform means software based and hardware based platform. A platform is a hardware or software environment in which software can be executed.
Explain about public static void main in Java
What are access specifiers in Java?
Access specifiers are used to defining the access scope of the method, class or a variable in Java. Java supports four types of access specifiers namely public, private, default and protected.
What are the packages and advantages of packages in Java?
They prevent naming conflicts. They are used to group related classes into a single package, Just like a file directory or folder. Packages are again divided into two categories 1. Built-in Packages 2. User-defined Packages
What is a Constructor in Java?
Constructors are used to initializing the state of the object. They are used to assign values to class variables at the time of creating an object. Constructors are invoked when the class is instantiated. There are two types of constructors. 1. Default Constructor 2. Parameterized Constructor.
Default constructors do not accept any value whereas Parameterized constructors accept arguments. The main purpose of default constructor is to assign default values to the objects at the time of creation. Constructors can be overloads like other methods in Java.
What are the differences between constructor and methods?