+ 3

[ Topic ] How to create objects in Java sololearn.

To create an object, you create a new class in the program like this. class a { void hi() { System.out.println("Hi"); } } public class lol { public static void main(String [] args) { a ha = new a(); ha.hi(); } } This creates a new object in Java.

13th Sep 2017, 3:48 PM
Dgames Crew
Dgames Crew - avatar
2 ответов
+ 6
This is covered by the course... https://www.sololearn.com/Course/Java/
13th Sep 2017, 4:29 PM
Tashi N
Tashi N - avatar