MCPcopy Create free account
hub / github.com/PrajaktaSathe/Java / Box

Class Box

Programs/ThisPointerExplicit.java:3–10  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1// Program to demonstrate 'this' pointer (explicit method) -
2package thisPointerExplicit;
3class Box {
4 int len = 50;
5 void display() {
6 int len = 100;
7 System.out.println("Local value = " + len);
8 System.out.println("Instance value = " + this.len);
9 }
10}
11public class ThisPointerExplicit {
12 public static void main(String[] args) {
13 // TODO Auto-generated method stub

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected