#Given the Day number, print the Day name in lower case corresponding to it by using the help of swit
1 messages · Page 1 of 1 (latest)
⌛ This post has been reserved for your question.
Hey @peak shard! Please use
/closeor theClose Postbutton above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
did i wrote anything wrong?
that's not an error. That's just intelliJ letting you know that your current switch can be replaced with an enhanced switch which would look like this:
switch(n) {
case 1 -> System.out.println("Monday");
...
yea but thats not working ..i have tried that
do you get an error when running the program ?
yes
getting error after changing it to that code that u have stated above
do you want to share the error with me or keep it to yourself ?
actually i moved to a another problem ..can u help me with another problem ?
sure just need information about the other problem
question- Write a program using only while loops to print all the even numbers from 1 to n
it says false😅
move i++ out of the if block
mean?
so what i have to do to remove this error?
move i++ out of the if block
yea int i=0
well try
nvm not working but showing green tick
when does the body of if block executed?
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
have a nice day :}