Core java interview question
121. To what value is a variable of the String type automatically initialized? The default value of an String type […]
121. To what value is a variable of the String type automatically initialized? The default value of an String type […]
115. What is constructor chaining and how is it achieved in Java ? A child object constructor always first needs
109. What is the difference between an if statement and a switch statement? The if statement is used to select
103. What is the difference between a public and a non-public class? A public class may be accessed outside of
97. What are the legal operands of the instanceof operator? The left operand is an object reference or null value
91. Name the eight primitive Java types. The eight primitive types are byte, char, short, int, long, float, double, and
85. Is null a keyword? The null value is not a keyword. 86. Which characters may be used as the
85. Is null a keyword? The null value is not a keyword. 86. Which characters may be used as the
79. What are order of precedence and associativity, and how are they used? Order of precedence determines the order in
73. What do you understand by private, protected and public? These are accessibility modifiers. Private is the most restrictive, while
67. Which class is extended by all other classes? The Object class is extended by all other classes. 68. Which
61. What value does read() return when it has reached the end of a file? The read() method returns -1
55. Why does Java not support operator overloading? Operator overloading makes the code very difficult to read and maintain. To
49. Why is an Interface be able to extend more than one Interface but a Class can’t extend more than
43. Can a abstract class be defined without any abstract methods? Yes it’s possible. This is basically to avoid instance
37. What is the importance of static variable? static variables are class level variables where all objects of the class
31. Can you give few examples of final classes defined in Java API? java.lang.String, java.lang.Math are final classes. 32. How
25. Can a class declared as private be accessed outside it’s package? Not possible. 26. Can a class be declared
13. What are instance variables? Instance variables are those which are defined at the class level. Instance variables need not
7. What is the base class of all classes? java.lang.Object 8. Does Java support multiple inheritance? Java doesn’t support multiple
Junior Engineer (Chemical) Hiring Organisation: GAIL (India) Limited Salary: INR Rs.16,300 – 38,500/- Address: GAIL Bhawan, 16, Bhikaiji Cama Place,
13. What are the advantages of cloud services? Some of the advantages of cloud service are given as follows: Helps
7. What is the AppFabric component? The AppFabric component is used to create access control and distribute messages across clouds
1. What is cloud computing? The cloud computing is the computing which is completely based on the Internet. It can
19. Which utility allows you to reference an assembly in an application? An assembly can be referenced by using the