Click here to watch in Youtube :
https://www.youtube.com/watch?v=z-kMDt4mypA&list=UUhwKlOVR041tngjerWxVccw
Click the below Image to Enlarge
Java Tutorial : Java this keyword (access fields) |
public class Student { public String name; public int age; public Student(String name, int age) { this.name = name; this.age = age; } }
public class StudentTest { public static void main(String[] args) throws InterruptedException { Student student = new Student("Peter", 45); System.out.println("name : " + student.name); System.out.println("age : " + student.age); } }
name : Peter age : 45
https://sites.google.com/site/javaee4321/java/ThisKeyWordDemoFieldsApp.zip?attredirects=0&d=1
Github Link:
https://github.com/ramram43210/Java/tree/master/BasicJava/ThisKeyWordDemoFieldsApp
Bitbucket Link:
https://bitbucket.org/ramram43210/java/src/68054fa19b88e552162495a83ba964283753af15/BasicJava/ThisKeyWordDemoFieldsApp/?at=master
See also:
You can find more diagram examples for class diagrams with keyword access in creately diagram community.
ReplyDelete