Thread: Quiz Time
View Single Post
  #113 (permalink)  
Old 05-09-2008, 03:58 PM
rjuyal's Avatar
rjuyal rjuyal is offline
Senior Member
 
Join Date: Mar 2008
Location: Delhi, India
Posts: 160
rjuyal is on a distinguished road
correct
Thts Right Sanjeev,

What's the answer of this:-

package com.faaltu.Quiz;

one more

Code:
public class StringInternTest { public static void main(String[] args) { String str1 = "string"; String str2 = new String("string").intern(); String str3 = new String("string").intern(); if ( str1 == str2){ System.out.println("\nSAME"); }else{ System.out.println("\nNEAH"); } if ( str1 == str3){ System.out.println("\nSAME"); }else{ System.out.println("\nNEAH"); } if ( str2 == str3){ System.out.println("\nSAME"); }else{ System.out.println("\nNEAH"); } } }
__________________
Newton said Gravitaion, Rakesh says Earth Sucks
Reply With Quote