Please note, this is a STATIC archive of website www.javatpoint.com from 19 Jul 2022, cach3.com does not collect or store any user information, there is no "phishing" involved.
Online Java Compiler By
JavaTpoint.com
class Student{ int id;//field or data member or instance variable String name; public static void main(String args[]){ Student s1=new Student();//creating an object of Student System.out.println(s1.id);//accessing member through reference variable System.out.println(s1.name); } }
Output