Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Example {
- public static void main(String[] args) {
- Student s2=new Student();
- s2.rollno=101;
- s2.name="imran";
- System.out.println("rollno = " + s2.rollno);
- System.out.println("name = " + s2.name);
- }
- }
- class Student {
- int rollno;
- String name;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement