Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How can i compare a String with a variable name in java ?

812390Jan 21 2011 — edited Feb 18 2011
Hi friends,

i want to compare a string with another variable name.

example :

String time ="1200" ;


String time1200 =" twelve clock";


now i want to compare the 1200 with time1200 .

one is string and other is variable name. any relative examples.plz
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 18 2011
Added on Jan 21 2011
18 comments
2,008 views