Guys page 248 of RHE, in the note it is said StringBuffer has equals method, which says will compare two encapsulated strings, but we know that equals always return false with StringBuffer. I just wanted to confirm with u guys. thanks.
the following code: 1. public class aclass 2. { 3. public static void main(String[] args) 4. { 5. int i = 015; 6. int j = 032; 7. int k = 078; 8. System.out.println(i); 9. System.out.println(j); 10. System.out.println(k); 11. } 12. } when compiled tells that "aclass.java:7:Invalid character in octal number. int k = 078;" here the mark points to the prefix zero. what is the mistake here. Thanks in advance
guys every object makes it own copy of the instance variables and methods(excluding the static variables and methods), so one object cant access the copy of the instance variable of the other object, eventhough they are from same class.