class test
{
void printLine()
{
System.out.println("Hello World"
}
}
class drive
{
public static void main(String args[])
{
test obTest[] = new test[10];
obTest[0].printLine();
}
}
My objective is to create an array of a class object and to work with it. The above one is a test code, and probably I am missing something as it is not working. Help me out someone.
I am a beginner, sorry for the dumb question.
and thanks in advance
Zavrisky
{
void printLine()
{
System.out.println("Hello World"
}
}
class drive
{
public static void main(String args[])
{
test obTest[] = new test[10];
obTest[0].printLine();
}
}
My objective is to create an array of a class object and to work with it. The above one is a test code, and probably I am missing something as it is not working. Help me out someone.
I am a beginner, sorry for the dumb question.
and thanks in advance
Zavrisky