Skip to main content Link Search Menu Expand Document (external link)

class

  • A class is a user defined blueprint or prototype from which objects are created.
  • class consist of different methods.
  • We can create the object of class.
  • The main() is the starting point for JVM to start execution of a Java program. Without the main() method, JVM will not execute the program.

class naming conventions

conventions :-

  • Convensions is not mandatory but we need to follow this conventions based on industrial standards. 1) The first letter of the class name should be in terms of upper case.
      e.g. Summation
    2) We can not give the space between the class name.
      e.g. ProgramOne
    3) We can use two special type characters.
      $ and _
    4) We can not start class name with numeric value. If we want to use numeric value we can provide after defining class name.
      e.g. Program1
    5) We can not use keyword as a class name. It will show compile time error.
      e.g. public, static