Explain about transient variables in java?
No Answer is Posted For this Question
Be the First to Post Answer
What will be the output of the program? public class Test { public static void main(String args[]) { ArrayList<String> list = new ArrayList<String>(); list.add("2"); list.add("3"); list.add("4"); list.add("5"); System.out.println("size :"+list.size()); for(int i=0;i<list.size();i++) { list.remove(i); } System.out.println("size after:"+list.size()); } }
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.
What is the implementation of destroy method in java. Is it native or java code?
How many bytes is a url?
what is the difference between yielding and sleeping? : Java thread
What does nullpointerexception mean?
I have a class which is abstract which contains only the abstract methods. This is similar to an interface. Then, if i have given a choice to choose one of them. Which one i have to choose and why?
What does the ‘static’ keyword mean? Is it possible to override private or static method in java?
What is charat java?
What is difference between word and integer?
Is math an abstract class in java?
what is the difference between Object Based Language and Object Oriented Language?