someone explain this code (which i mostly understand
public static void main(String[] args) {
int number = 0;
while (true) {
number = number + 1;
if (number >= 5) {
break;
}
if (number < 5) {
continue;
}
System.out.print(number + " ");
}
System.out.print(number + " ");
}
i get everything in this code yo but i dont understand how the output here works, and ive done a few codes like this such but what da hell
53 Replies
⌛
This post has been reserved for your question.
Hey @°~°! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
Please format your code to make it more readable. For java, it should look like this:
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.
import java.util.Scanner;
look i made this code by my own but i dont get the one above
look i made this code by my own but i dont get the one above
This message has been formatted automatically. You can disable this using
/preferences
.ahhh wait i think i get it
it broke at 5 since it BECAME >= 5, and instead of printing the one inside the while loop, it only printed the one outside of it since it broke eh?
did i get things right or am i confused
the program stopped once it reached 5
and it printed it outside the loop
but the print inside the loop didnt print cos it broke before the print command correct?
btw why is my name this...
Your name was not sufficiently pingable so the bot randomized it - I guess you have DMs disabled so you didn't get notified of that
no i just ignore bots
or that
it should have told you about the name change
yo dan
is mooc good
or should i be hunry for more
If you are looking for a Java course, consider https://java-programming.mooc.fi/ which is a free course on Java Programming from the University of Helsinki.
When doing the course, it is recommended to use Eclipse or IntelliJ instead of NetBeans.
that one?
14 part one
from what I've heard, it's quite good
what else did you heard thats better than quite good
I mean I didn't go through it by myself
i think i have adhd so a professor speaking just doesnt sit with me
what taught u java
In Austria, we have certain technical schools and I did one for informatics/software development - and I also did a lot of other stuff
not college...
im in my 2nd consecutive day of learning so idk how long this will take
:roomad1: :roomad2:
if you really want to get good at programming, it will take time and a lot of practice
how much progress will i get in 4 months?
depends on you
14 hours a week
4 hours done this week, 10 hours left
I think it's reasonable to get the basics to a point where you can work on small projects on your own
but do i gotta think of my own kind of idea
i did do this mini project which was very nooby
import java.util.Scanner;
Used no help
This message has been formatted automatically. You can disable this using
/preferences
.i mean it was a mooc task but i took it on solo
yes
will organizations even hire me if i know java, and lets just say some other things too not just a java cert on my vc
When I meant working on small projects on your own, I meant that if you are interested in doing something without anyone writing a task for you, you might be able to implement it by yourself
got any examples
well dont give me examples just tell me a project u made
Depends on how much you know Java, how good you can show your knowledge, your experience with libraries/frameworks/etc, where you live, the companies near you, etc
im willing to move out for a job
but it will probably be hard
idk maybe a Discord bot, maybe something automating some work you have to do all the time, etc
whatever is fun for you
well not saying im relying on java to get a job, but lets say thats the programming language part of my cv
in 3 years i will have a computer science degree but i feel like those are just papers u could throw away nowadays
it certainly helps with getting a job
getting the first job in that field is way harder without a degree
those roadmap youtubers are a bunch of liars ig
im ok with a basic low salary job at first, not planning on getting married and im not a spender
but over time i wanna make tons and send it to my family
I guess at least some of them do at least kinda believe in what they say
they make everything sound like a peace of cake
Is that necessarily lying?
"just go get a a+ and then a network+ and some wireshark then you automatically become a ceo at an airport tech branch"
lol
i mean i only started watching them when that was the only field i got accepted in
at uni
so i started trusting these guys with what i should do
I mean, they probably have an idea of what they are teaching you at uni
no not uni professors
those youtube roadmap guys
yes ik
they made me not wanna continue uni cos how useless is that huh
you just need a googly cybersecurity cert not a university degree
(they are sponsored by google)
well, that's on you
its ok i just fkced up first semester the rest is going ok
and im currently continuing some udemy a+ course its that bald guy
jason dion
idk these people
is that also a waste of time
like he explains cables for 30 mins in just section 2 let alone the other 25 sections idk what they might contain
💤
Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping
.
Warning: abusing this will result in moderative actions taken against you.