Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class StringCompare{
- public static void main(String[] args){
- String hello = "Hello World";
- String world = "Hello World";
- System.out.println(hello == world);
- hello = new String("Hello World");
- System.out.println(hello == world);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment