Advertisement
JeffGrigg

p20180913 Example

Sep 13th, 2018
543
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5 0.32 KB | None | 0 0
  1. public class Example {
  2.     public static void main(String[] args) {
  3.         Student s2=new Student();
  4.         s2.rollno=101;
  5.         s2.name="imran";
  6.         System.out.println("rollno = " + s2.rollno);
  7.         System.out.println("name   = " + s2.name);
  8.     }
  9. }
  10.  
  11. class Student {
  12.     int rollno;
  13.     String name;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement