This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Dec 12th, 2012  |  syntax: Java  |  size: 0.23 KB  |  views: 31  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. public class Main
  2. {
  3.         public static void main(String[] args)
  4.         {      
  5.                 System.out.println("foo" == "foo"); // true
  6.                
  7.                 String a = new String("foo");
  8.                 String b = new String("foo");
  9.                
  10.                 System.out.println(a == b); // false
  11.         }
  12. }
clone this paste RAW Paste Data