Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search Coderanch
Advance search
Google search
Register / Login
Harsha Subbarayappa
Greenhorn
+ Follow
news
5
Posts
2
Threads
since Oct 19, 2010
Merit badge:
grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads
Recent posts by Harsha Subbarayappa
compile time constant and final variable
Thank you very much.
show more
13 years ago
Programmer Certification (OCPJP)
compile time constant and final variable
it's the link to the same page....
show more
13 years ago
Programmer Certification (OCPJP)
compile time constant and final variable
Can anyone please explain
what is the diff between initializing final variable in same line where it is declared and initializing in other line inside a method.
//constant expression required (case : x) class SwitchExample{ public static void main(String args[]){ final int x; // final int x = 5; (works fine) x = 5; int i = 5; switch(i){ case 2: System.out.println("two"); break; case 3: System.out.println("three"); break; case x: System.out.println("five"); break; default: System.out.println("don't know"); } } }
show more
13 years ago
Programmer Certification (OCPJP)
Integer Wrappers Comparison doubt
Got it...
http://www.owasp.org/index.php/Java_gotchas
Thanks you very much.
show more
13 years ago
Programmer Certification (OCPJP)
Integer Wrappers Comparison doubt
Hi Can anyone please explain why it prints
i1 i2 not equal
i3 i4 both equal
Thanks.
class IntegerWrapper{ public static void main(String args[]){ Integer i1 = 5000; Integer i2 = 5000; if(i1 == i2) System.out.println("i1 i2 both equal"); else System.out.println("i1 i2 not equal"); Integer i3 = 20; Integer i4 = 20; if(i3 == i4) System.out.println("i3 i4 both equal"); } }
show more
13 years ago
Programmer Certification (OCPJP)