What is the difference between C++ & Java?
Answer Posted / mustafa daudi
*Java Supports dynamic memory allocation due to dynamic
allocation there is no wastage of memory..
While in c++ there is wastage of memory.
*Java is exensible because new class can easily added in
libraries while in c++ it is not possible..
| Is This Answer Correct ? | 9 Yes | 1 No |
Post New Answer View All Answers
Is it correct to say that due to garbage collection feature in java, a java program never goes out of memory?
Can a method be overloaded based on different return type but same argument type?
Can we override constructors in java?
What is the purpose of lambda expressions?
Can size_t be negative?
How do you define a parameter?
How to write custom exception in java?
How do you remove an object from an arraylist in java?
What is the synonym of string?
Tell me a few examples of final classes defined in Java API?
What is reverse function?
Explain about oops concepts.
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 java’s garbage collected heap?
Does java allow default arguments?