akhter wahab wrote:yes we can
yes we can
[OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
satish varma wrote:in wich version of java this code?
check out that statements did you mean s1,s2 are not comparable?two values must be comparable with == to be used in switch
satish varma wrote:
check out that statements did you mean s1,s2 are not comparable?two values must be comparable with == to be used in switch
Henry Wong wrote:Since switch on string isn't supported yet -- a discussion about the implementation is kinda moot.
Praveen Kumar wrote:We can not use Strings inside the Switch statement. But we can use Compiletime Constants like final String TEMP in LABEL of the Switch statement.