answersLogoWhite

0

Creating an object in java

User Avatar

Daanishlive

Lvl 1
9y ago
Updated: 8/21/2019

You use the "new" operator, for example:

MyClass x = new MyClass();

User Avatar

Wiki User

10y ago

What else can I help you with?

Related Questions

What is a BufferedReader in java?

buffered is basically a way of creating an object


How do you set the constant textarea in java?

we can set the value of constant text area in Java in swing by creating a object of Jframe


What does new mean in java?

new means that you are creating, a new object. For example: new Scanner, to get user input.


What is a java object?

A java object is a collection of methods and properties defined in the Java programming language.


What is instance method?

An instance method is nothing but a normal java method. They can be invoked only by creating an object of the class that contains the method definition. Unlike static methods that can be invoked without creating an object of the class.


Use of valueOf function in java?

The valueOf functions are used in the Java wrapper classes to convert between types. Common uses are converting a number to a String or vice versa. You are encouraged to use these functions instead of creating a new object from a constructor because of the way Java caches values. A call to valueOf will give you the same result as creating a new object, but it may be more efficient if you're creating the same values multiple times.


What language is completely object oriented c plus plus or java?

Java is the complete object oriented Programming Language as every thing in java is an object,


Can you initialize an object without constructor in java?

No. if you wish to create an object that you plan on using in a java program then the answer is NO. You cannot initialize an object of a Java class without calling the constructor.


Why do you require a object in java but not in C?

Because Java is an object-oriented language and C is a procedural language.


Is there class name as object in java?

Yes, the base class for all other Java classes is Object.


Did java oriented language works on object?

Java is an object oriented language, and it works with classes and objects.


Why java is certifiction?

java is a object oriented langage,that is indepentant platform. java is full object oriented language. java is access any operating system.so java is good certification of program in runtime environment.