ariestamirra

EqTest6

Apr 5th, 2014
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.27 KB | None | 0 0
  1. public class EqTest6{
  2. public static void main(String argv[]){
  3.     String str = "Java";
  4.     StringBuffer buffer = new StringBuffer(str);
  5.         if(str.equals(buffer)){
  6.             System.out.println("Both are equal");
  7.         }
  8.         else{
  9.             System.out.println("Both are not equal");
  10.         }
  11.     }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment