posted in online test
How many types of memory areas are allocated by JVM in java?
Suppose there is a System A which gives some output. This output is used as input by system B. The rate at which System A produces is faster than the rate at which system B consumes it. How can you improve this?
84. try { 85. ResourceConnection con = resourceFactory.getConnection(); 86. Results r = con.query(”GET INFO FROM CUSTOMER”); 87. info = r.getData(); 88. con.close(); 89. } catch (ResourceException re) { 90. errorLog.write(re.getMessage()); 91. } 92. return info; Which is true if a ResourceException is thrown on line 86? 1 Line 92 will not execute. 2 The connection will not be retrieved in line 85. 3 The resource connection will not be closed on line 88. 4 The enclosing method will throw an exception to its caller.
Explain different ways of creating a thread. Which one would you prefer and why?
What is final class?
Why are the methods of the math class static?
What does the ‘static’ keyword mean? Is it possible to override private or static method in java?
Why do you canvas?
How can we make copy of a java object?
Can we create a constructor in abstract class?
What is dot operator?
How can final class be used?