rankz_VtujUdhflsoFhdgp class in java - All type study material

Java programming

Java programming

About Me

my self - Harvendra Singh

Search This Blog

Friday, February 14, 2020

class in java

class in Java - class is a collection of similar type object. A class is a user defined data type with a template that screes to defined its properties.

Example -
    class sample one
     {
      public static void main(string args[])
     {
      system.out.println("java is better than 

c++");
       }
    }

Access modifiers -There are three type of access modifiers

  1. Public 
  2. Private 
  3. Protected         
      

3 comments: