Friday, 23 June 2017

Interview Questions

đŸ‘‰  Basic Questions 


Ques->What is the most important feature of Java?
Ans->The most important feature of Java is that Java is a platform independent language.


Ques->What do you mean by platform independent?
Ans-> Platform independent means that we can write and compile the java code in one platform (example windows) and can execute the class in any other supported platform example (Linux ,Solaris ,etc).


Ques->what is a JVM?
Ans->JVM is Java Virtual Machine which is a run time environment for the compiled java class files.


Ques->Are JVM's platform independent?
Ans->JVM's are not platform independent. JVM's are platform specific run time implementation provided by the vendor.


Ques->What is the operation of JVM?
Ans->JVM mainly performs following operations-

  • Allocating sufficient memory space for the class properties.
  • Provides runtime environment in which java bytecode can be executed.
  • Converting byte code instructions into machine level instructions.


Ques->What is the base class of all classes?
Ans-> The base class of all classes is  java.lang.Object  .


Ques->What is the difference between Path and Classpath?
Ans->Path and Classpath are operating system level environment variables. Path is used  define where the system can find the executables(.exe) files and classpath is used to specify the location .class files.


Ques->What is API?
Ans->An API(Application Programming Interface)  is a collection of packages, classes, interfaces and sub-packages . And subpackage is also a collection of classes interfaces and sub-packages etc.


Ques->Why Java take 2 bytes of memory for store character?
Ans-> Java support more  than 18 international languages so java take 2 bytes for characters, because 18 international language 1 byte of memory is not  sufficient for storing all characters and sysmbols present in 18 languages. Java supports unicode but C support ASCII code. In ASCII code only english language are present , so  for storing all english latter and symbols 1 byte is sufficient.









No comments:

Post a Comment