0
Syntax for classes and object
what is the syntax for creating a class and object...and how to access or call it
3 odpowiedzi
- 2
Class A
{
public int B() \\ method
{
}
}
public Class C
{
public static void main(string[] args)
{
\\new creates an object D of class A and A() is a default constructor here.
A D = new A(2);
\\call method in A through object D.
D.B();
}
}
+ 9
You'll find that in the Java course (chapter Classes And Objects). If you already went through it, try to repeat it.
If you have any further or more specific question on the topic - just ask.