Java Language Interview Question and Answers

6. What is variables and then types?
 
    Variables is an identifier that denotes a storage location used to store a data values.unlike constants that remain unchanged during the execution of a program, a variable may takes different values at different times during the execution of the program.
  • Instance variables
  • Class variables
  • Local variable
  • Parameters
7. what is dot operator?
  The dot operator(.) is used to access the instance variables and methods of class objects.It is also used to access classes and sub-packages from a package.
Examples :
Person1.age ---------> Reference to the variable age
8. Define strings?
  Strings represent a sequence of characters.The easiest way to represent a sequence of characters in java is by using a character array.
9. What is serialization?
  Serialization is the process of converting a objects into a stream of bytes.
10. What are different types of access modifiers?
 
    Access specifiers are keywords that determine the type of access to the member a class.
  • Public
  • Protected
  • Private
  • Default
123456789101112 Page 2 of 12