Isn't it confusing,
because it looks like a method,
And who teach me to creat an object under a class,
CodeGym getting confusing for me.
Tasks are coming with no pre exercises!!
Method and object
Under discussion
Comments (3)
- Popular
- New
- Old
You must be signed in to leave a comment
hidden #10568956
10 December 2019, 08:04
I have the same felling is very frustrating.
0
mras
22 November 2019, 05:24
example;
package s
public class soln{
public static void main(String[]args){
Dog dog = new Dog();
}
}
// public static void main() is a method because it has a body enclosed by {} while Dog dog = new Dog (); is creation of an object and objects are just instances of a class with no body.
hope that simple example helps
0
Guadalupe Gagnon
21 November 2019, 14:10
This task is demonstrating KEY components of object oriented programming. If you are not able to figure out a task, skip it for a couple of lessons and come back and try again.
0