Can you have an inner class inside a method and what
variables can you access?
Answers were Sorted based on User's Feedback
Answer / janet
yes, we can have an inner class inside a method and final
variables can be accessed.
| Is This Answer Correct ? | 15 Yes | 0 No |
Answer / kabita
yes we have.it is called local inner class.it can access
only final variables of outer class.
| Is This Answer Correct ? | 7 Yes | 0 No |
Can you explain the final method modifier?
What is the purpose of premetive data types in java?
What are the advantages and disadvantages of object cloning?
Describe what happens when an object is created in java ?
What is exception handling in java?
Difference between JDK, JRE, JVM
16 Answers Deloitte, HCL, Mind Tree, Oracle, Reliance, TCS, ThinkBox,
Why we go for collections in java?
What is the purpose of a parameter?
Draw a UML class diagram for the code fragment given below: public class StringApplet extends Applet { private Label sampleString; private Button showTheString; private ButtonHandler bHandler; private FlowLayout layout; public StringApplet() { sampleString = new Label(" "); showTheString = new Button (" Show the String"); bHandler = new ButtonHandler(); layout = new FlowLayout(); showTheString.addActionListener(bHandler); setLayout(layout); add(sampleString); add(showTheString); } class ButtonHandler implements ActionListener { public void actionPerformed(ActionEvent e) { samplestring.setText("Good Morning"); } } } Note: The methods need not be indicated on the diagram.
Why is prepared Statement, Callable Statement used for? What is the need of Batch updates?
What are inner classes or non static nested classes in java?
What is the difference between Array and Hash Table?