System is a class or a package?

Class Test
{
public static void main(String... a)
{
System.out.println("hello world");
}
}
In the above code if we write "s" of String class in lowercase, it gives an error of class not found, but if we write "S" of "System" class in lower case it gives an error package not found.
why?

Questions by anchitkm   answers by anchitkm

Showing Answers 1 - 6 of 6 Answers

Prabha

  • Aug 10th, 2011
 

System is a class which is available in lang package and we need not to create object. When we give System as system compiler searches in the package and gives an error.

String is also a class and we can create objects to handle character strings and it is a reference datatype

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions