Java Interview Question Set1
Welcome to the Java basic interview question set-1.
What is the current version of java in the market?
Last version of java released is Java SE10 on 20th March, 2018.
Latest version of java 10 was released with 12 new features.
Java SE11 is planned to release on 25th September, 2018.
So at present (June, 2018) Java SE10 is the current version of java.
Note: Its always important to be aware of the current version of the technology for which you are appearing for the interview.
Is java pure OOP language?
Most of us are generally aware that java supports object oriented programming. But java is not a pure OOP language as it supports primitive data types as well like int, double, float, long, etc. as well which is in contrast to the OOP that deals particularly in objects only.
Example of pure OOP: Smalltalk
A pure OOP must satisfy all of these:
every user-defined type must be object,
all operations performed on the objects must take place through methods exposed as object.
Java violates the last two rules (marked in red) of OOP.
In java pre-defined types such as primitive types are non-objects.
Apart from this a class declared as static does not require to be instantiated at all for calling it.
Thus we can conclude java is not pure oop.
Q-3: Name some application where java is used?
Most of the popular IDE we work on is created using java:
We can also use it to build:
Android application can be programed in java.
Q-4: What are popular features of java?
Given below are few important features of java:
Simple and easy to learn
We have already explined each point in our java tutorial here...
Q-5: Why java is platform independent in nature?
Platform independent indicates 'write once and run anywhere' or WORA. It means that it doesn't matter on what operating system(lets say,Windows OS) the code was written, it could be run on the other operating system(lets say Linux) conveniently and without any issue.
Whenever we write a program, say HelloWorld.java and compile it then a .class file is created with name HelloWorld.class.
This .class file contains bytecode instructions for JVM. Now you can run on the same system or you can happily port this bytecode on other operating system that has JVM and leave all your worries of completing your task of running the code on JVM.
Above answer is taken from our java tutorial page. To read more follow the link - Platform Independence in java