please, i need a java code that convert if statement to switch statement (Contrarily)
and convert for statement to while statement (Contrarily). ( deal with nested statement)
sara_84
4
Light Poster
Recommended Answers
Jump to PostWhat are you talking about?
You want code to change code? Are you attempting to build some sort of parser or something?
Also, there is nothing "contrary" about the comparison between if/switch and for/while. Those statement groupings do the same things, not "contrary" things, which makes your post …
Jump to Postswitch-case statements can check only integer or character values.
To be more precise, switch statements can handle all Integral types except long. Character values and Integral values are not separate entities as explained below.
A primitive type is predefined by the Java programming language and …
Jump to PostDo not worry so far sara_84 did not reply to anything originaly posted in first or second post. I would say it is pass deadline.
Anyone want to help me with coursework?. Joking:P
Jump to PostSorry about that Jishnu, sara_84 posted in two separate threads and a moderator has linked them. Now it looks like I asked her to post when she had already posted!
Understood.
Do not worry so far sara_84 did not reply to anything originaly posted in first or second post. I …
All 15 Replies
masijade
1,351
Industrious Poster
Team Colleague
Featured Poster
sara_84
4
Light Poster
masijade
1,351
Industrious Poster
Team Colleague
Featured Poster
sara_84
4
Light Poster
rajatC
-1
Junior Poster
Jishnu
160
Posting Pro
~s.o.s~
2,560
Failure as a human
Team Colleague
Featured Poster
Jishnu
commented:
Right. I was wrong in considering char as a different type.
+2
sara_84
4
Light Poster
darkagn
315
Veteran Poster
Featured Poster
peter_budo
2,532
Code tags enforcer
Team Colleague
Featured Poster
masijade
1,351
Industrious Poster
Team Colleague
Featured Poster
Jishnu
160
Posting Pro
darkagn
315
Veteran Poster
Featured Poster
peter_budo
2,532
Code tags enforcer
Team Colleague
Featured Poster
darkagn
commented:
lol
+1
Jishnu
160
Posting Pro
darkagn
commented:
You are always so nice to everyone!
+1
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.