answersLogoWhite

0

The keyword new is used to instantiate or create Java class objects.

ex:

String empName = new String("Rocky");

The above statement creates a new String object of name empName and value as Rocky

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

What is the purpose of the keyword in a house?

The purpose of a keyword in a house is to unlock or secure a door or other entryway.


What is a new keyword in java methods?

new is a keyword to create a instance of object any class.


What is the use of keyword new used in AWT programming?

what is the use of new keyword in awt programming


What is the purpose of the keyword in a bicycle's drivetrain system?

The purpose of the keyword in a bicycle's drivetrain system is to transfer power from the rider's legs to the rear wheel, allowing the bike to move forward efficiently.


When will the keyword be implemented in the new software update?

The keyword will be implemented in the new software update next month.


What is the purpose of pursuing a master's degree in keyword?

The purpose of pursuing a master's degree in keyword is to deepen your knowledge and expertise in a specific field, enhance your career opportunities, and potentially increase your earning potential.


What is the purpose of the keyword private?

The private keyword is used to ensure that no other classes will be able to access (view or modify) that class member.


What is the main purpose of a keyword tool?

The main purpose of a keyword tool is to help simplify the searching process, make suggested or related terms and show most common related items that others have used.


What is the purpose of the cont callable keyword in programming languages?

The purpose of the cont callable keyword in programming languages is to continue the execution of a program from a specific point, allowing for more flexibility and control in the flow of the program.


What is the purpose of he keyword in this context?

The purpose of the keyword in this context is to help search engines understand the main topic or theme of a piece of content, making it easier for users to find relevant information when searching online.


What is the purpose of using the sub keyword in programming languages?

The purpose of using the "sub" keyword in programming languages is to define a subroutine or a function that can be called and executed within the program to perform a specific task or set of tasks.


What does the new function do?

The new keyword creates a new Object.