Why Java is not purely object oriented?
Answer Posted / nilesh b
As in C++ and some other object-oriented languages,
variables of Java's primitive data types are not objects.
Values of primitive types are either stored directly in
fields (for objects) or on the stack (for methods) rather
than on the heap, as commonly true for objects . This was a
conscious decision by Java's designers for performance
reasons. Because of this, Java was not considered to be a
pure object-oriented programming language.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All 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.
Why strings in java are called as immutable?
Is a method a function?
What is the similarity between dynamic binding and linking?
What is java in layman terms?
Is java platform independent?
What is the size of integer?
design an lru cache in java?
Can we call virtual funciton in a constructor ?
How do you define a parameter?
Explain about arraylist?
Why do we need variables?
How to disable caching on back button of the browser?
Why do we use regex?
What do you mean by thread safe?