Guest User

Untitled

a guest
Feb 9th, 2012
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.26 KB | None | 0 0
  1. public class StringCompare{
  2.  
  3.     public static void main(String[] args){
  4.     String hello = "Hello World";
  5.     String world = "Hello World";
  6.  
  7.     System.out.println(hello == world);
  8.  
  9.     hello = new String("Hello World");
  10.     System.out.println(hello == world);
  11.  
  12.     }
  13.  
  14. }
Advertisement
Add Comment
Please, Sign In to add comment