Submitted Questions

  • 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?

    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