Computer Science, asked by mmurthysavitha, 2 months ago

write a main method to create an object of the class and all the above members method​

Answers

Answered by Anonymous
69

Answer:

To create an object of MyClass , specify the class name, followed by the object name, and use the keyword new :

Example. Create an object called " myObj " and print the value of x: public class Main { int x = 5; public static void main(String[] args) { Main myObj = new Main(); System. ...

ᎻᎾᏢᎬ ᎨᎿ ᎻᎬᏝᏢᏕ ᎽᎾᏬ

Answered by niha123448
3

Explanation:

ANSWER ✍️

To create an object of MyClass , specify the class name, followed by the object name, and use the keyword new :

Example. Create an object called " myObj " and print the value of x: public class Main { int x = 5; public static void main(String[] args) { Main myObj = new Main(); System.

ᎻᎾᏢᎬ ᎨᎿ ᎻᎬᏝᏢᏕ ᎽᎾᏬ!

Similar questions