|
-
July 9th, 2011, 05:55 AM
#1
java code review?
Hi
I have some code segments. can someone please review it and tell me the problems if any?
1.)
String a=null;
if (a!=null & a.length()>10) {
System.out.println(“Inside if”);
}
System.out.println(“Outside if”);
2.)
int m = 0;
while( m++ < 2 )
System.out.println( m );
3.)
Hashtable hashtable = new Hashtable();
hashtable.put("One", “1”);
hashtable.put("Two", “2”);
hashtable.put("One", “1”);
while(hashtable.keys().hasMoreElements() ){
System.out.println(hashtable.keys().nextElement());
}
Thanks for your time.
Regards
Arvind
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|