Created
April 10, 2020 17:41
-
-
Save sanjibnarzary/9a2af7db3b31e576f9ec721a7c473029 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main(){ | |
print("Hello World"); | |
Student s = new Student(23,"Sanjib Narzary","G1234"); | |
print(s.roll); | |
} | |
class Student{ | |
int age; | |
String name; | |
String rollNumber; | |
Student(int age, String name, String rollNumber){ | |
this.age = age; | |
this.name = name; | |
this.rollNumber = rollNumber; | |
} | |
String get roll{ | |
return rollNumber; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment