Initial Checkin

This commit is contained in:
Joe Tretter
2023-03-02 18:06:10 -06:00
commit c1a00eea1f
19 changed files with 3550 additions and 0 deletions

25
RefAndVal3.java Normal file
View File

@@ -0,0 +1,25 @@
public class RefAndVal3 {
public static void main(String[] argv ){
String s="HHH";
String t=s;
System.out.println("A: _" + s + "_ -> " + (t.equals(s)) + "/" + (t==s));
s="H".substring(0)+"H"+"H";
System.out.println("B: _" + s + "_ -> " + (t.equals(s)) + "/" + (t==s));
s="HHH".replace("HHH", "HHH");
System.out.println("C: _" + s + "_ -> " + (t.equals(s)) + "/" + (t==s));
s="H"+"H".concat("H");
System.out.println("D: _" + s + "_ -> " + (t.equals(s)) + "/" + (t==s));
s="H" + "H" + "H";
System.out.println("E: _" + s + "_ -> " + (t.equals(s)) + "/" + (t==s));
s="HHH".concat("");
System.out.println("F: _" + s + "_ -> " + (t.equals(s)) + "/" + (t==s));
s="HHH".replace("", "");
System.out.println("G: _" + s + "_ -> " + (t.equals(s)) + "/" + (t==s));
}
}