State the difference between creating string as new () and literal.


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More Core Java Interview Questions

class A { private int i; } class B extends A { private int i; } if I create an object of B class what will be the memory of that object.

2 Answers   Yamaha,


What are some alternatives to inheritance?

0 Answers  


What is size of int in java?

0 Answers  


Can you declare the main method as final?

0 Answers  


What is exception handling in java?

0 Answers  






What class is used to implement a Throwable array?

3 Answers  


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.

0 Answers  


What is string value?

0 Answers  


What is a java predicate?

0 Answers  


What’s the difference between unit, integration and functional testing?

0 Answers  


How to make a read-only class in java?

0 Answers  


Tell me how many ways are there to initialise an integer with a constant.

0 Answers   Aricent,


Categories