Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

Java’s generic programming does not apply to the primitive types. True or False?

String myStr1 = "Hello";String myStr2 = "Hello";String myStr3 = "World";System.out.println(myStr1.equals(myStr2)); // Returns "true" because they are equalSystem.out.println(myStr1.equals(myStr3)); // Returns "false"
Source by my.uopeople.edu #
 
PREVIOUS NEXT
Tagged: #generic #programming #apply #primitive #True
ADD COMMENT
Topic
Name
6+9 =