File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11/**
2- * Demonstates uses of Strings.
2+ * Demonstrates uses of Strings.
33 */
44public class Strings {
55
Original file line number Diff line number Diff line change 11import java .math .BigInteger ;
22
33/**
4- * Demonstates uses of objects and wrappers.
4+ * Demonstrates uses of objects and wrappers.
55 */
66public class Objects {
77
@@ -24,8 +24,8 @@ public static void main(String[] args) {
2424
2525 // Wrapper classes
2626
27- Integer x = new Integer (123 );
28- Integer y = new Integer (123 );
27+ Integer x = Integer . valueOf (123 );
28+ Integer y = Integer . valueOf (123 );
2929 if (x == y ) { // false
3030 System .out .println ("x and y are the same object" );
3131 }
Original file line number Diff line number Diff line change 22import java .awt .Rectangle ;
33
44/**
5- * Demonstates use of Point and Rectangle classes.
5+ * Demonstrates use of Point and Rectangle classes.
66 */
77public class PointRect {
88
You can’t perform that action at this time.
0 commit comments