Syntax

import java.*;
import java.io.*;

class student
{
 int id =5;
 String name="pl";
   
   public static void main(String arg[])
    {
  student s1 = new student();
   System.out.println(s1.id); // int default = 0
   System.out.println(s1.name); // String default = null
  }
 
 }
OUTPUT
0
null

See How to Implement This Program :
please Subscribed this tutorial to : Click here

Leave a Reply

Subscribe to Posts | Subscribe to Comments

All Notes on BCA

All Notes  on BCA
BCA all subjects notes

Total Pageviews

Translate

Powered by Blogger.

Copyright © All Notes on BCA