forked from google/codeu_coding_assessment_2017
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDPointers.java
More file actions
33 lines (29 loc) · 748 Bytes
/
DPointers.java
File metadata and controls
33 lines (29 loc) · 748 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
public class Dpointers {
public static void main(String[] args) {
System.out.println();
MyPointer p1= new MyPointer();
System.out.println("MyPointer p1= "+ p1);
MyPointer p2=p1;
System.out.println("MyPointer p2 = "+p2);
System.out.println("MyPointer p2 == MyPointer p1?" + (p2==p1));
MyPointer p3= new MyPointer();
System.out.println("MyPointer p3 = " + p3);
/*System.out.println();
String s1= new String();
System.out.println("String s1 = "+ 'x' + s1 + 'x');
System.out.println();
String s5 = new String("yes");
if (s5 == "yes") {
System.out.println("yessir");
}
if (s5.equals("yes")) {
System.out.println("yes maan");
}
String s6= "yes";
if (s6) */
}
}
class MyPointer{
public MyPointer() {
}
}