answersLogoWhite

0

How the new operator works in java?

Updated: 8/11/2023
User Avatar

Wiki User

12y ago

Best Answer

1. It is the only way to create object. 2. New is a keyword. 3. New operator allocates memory for an object. 4. It is a bit faster and clever way of creating objects or instances.

User Avatar

Wiki User

15y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

12y ago

with help of new operater allocate memory space in the compurt memory

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How the new operator works in java?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Which operator works like sizeof operator in Java?

Java does not have the sizeOf() operator or any operator that gives an equivalent result.


Explain how objects are created in Java?

with new operator


Explain the role of sizeof operator in java?

There is no sizeOf() operator in Java.


Why are you used new operator in main method in java?

new is used for memory allocation in java which on later automatically deallocated by garbage collector.


Operator overloading is possible in java or not?

Java does not support opperator overloading, so the answer to your question is: none.


What are the restriction that are applied to operator overloading?

Java does not support user defined operator overloading.The operator '+' is overloaded in Java and can be used for adding both numbers and Strings.


When the Java Virtual Machine sees the new operator in a program it instantiates an object for a specified class.?

Yes.


Which operator work like charAt in VB.NET?

The ElementAt() in VB .NET works as charAt operator in Java. Look at that code: http://vbdotnettutor.blogspot.com/2010/10/javas-charati-equivalent-in-vbnet.html


What is operator in java?

An operator is a symbol that does something in Java. for ex: "+" is an arithmetic operator that adds two numbers. ">" is a logical operator that checks if one number is greater than the other. There are many different types of operators in Java like Arithmetic, Logical, Relational and Assignment operators


What happen when a java keyword new is used in an application?

When the new operator is used, a new object is created, based on the specified class.When the new operator is used, a new object is created, based on the specified class.When the new operator is used, a new object is created, based on the specified class.When the new operator is used, a new object is created, based on the specified class.


Difference between equals equals and equal in java?

"==" in java is the binary operator which compares two values and gives a boolean result While "=" in java is a assignment operator which assigns a value to a variable.


The multiplication operator is represented in Java by what symbol?

In Java, the multiplication operator is represented by the asterisk, "*". This was not invented by Java; most programming languages, as well as programs such as Excel, use the same symbol.