Added: 2 years ago
From: thenewboston
Views: 149,509
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (276)

Sign In or Sign Up now to post a comment!
  • When I reach the last episode, I'm going to post this: (╯°□°)╯︵ ┻━┻

  • Comment removed

  • I'm glad I know a lot about Lua. That makes learning this easy!

  • For loops have confused me for a long time..... And I finally get it!!! :D

    I have tried several different books and video series and this has done the best so far

  • Damn, now I gotta find what BearZzZz1 said...

    AND I SHOULD BE LEARNING JAVA.

    damn you youtube...

  • @TheViolinCalamity Corny.

  • @TheViolinCalamity Find out what went down?

    Cant see what happened?:D

  • "sup guys, it's bucky"

    legendary

  • It seems like that 20,000 views are dropped every tutorial unless it's featured somewhere.

  • thanks for the videos!

  • This is 100x more powerful to actually understand that what the fuck is goin' on than to listen to our teacher that doesn't even know what the flying fuck is she talking about.

  • I learned more from this this video than I did from my teacher over a course of 6 weeks. Thank you.

  • when you said 22nd i thought 20 seconds lol

  • why <?

    

  • i always forget the semicolons and make kommas instead. Why the heck are there semicolons?

  • Comment removed

  • omg

    

  • @LordJogaBonito lol! ur right lmao.

  • I like how it goes on forever if u type in -- instead of ++

  • he is the real 1 tat i might cry if he die(he is way more greater than Steve Jobs......)

  • is it just me or are these starting to make more sense now?

  • Wish I had found your videos back in September....

  • Honestly, no, Honestly, Who are those fuckers who disliked this video ? I want to kill them!

  • tech teacher: please type your book 500 times.

    class: ahh. :(

    me: muah ha ha ha ha

  • do people use java to make games nowadays for big game companys?

  • @kidharris55 Nope, not really. The only "big" game company that have made a popular game using Java is Minecraft, and it's graphics sux.

  • @MrLemonmage What about runescape! .... wait damnit i wasnt supposed to reveal that! oh the shame!

  • @MrLemonmage Graphics are awesome, supposed to be like that, unlike fortresscrap

  • @kidharris55 They do, But more C The IW eingine(mw3 + mw2 etc) Was written in C :)

  • @Miip3rson C++* :P

  • @zZerualz :L

    

  • @Miip3rson :D

  • This is the most important, when ever i saw for (int i = 0, i > 0, i++) i used to shit my pants now this solved it.

  • may I ask a question?

    when answering a quiz that needs to be in a syntax form of a program

    how can I answer it easy and fast?

  • What Application is he using to write his programs? Anyone know? Thanks.

  • @IndianPlayer15 Eclipse,Get back to first tutorials...

  • teacher whta if we ask them to enter a number from 50-100 and then they keep going.. it stops when they entered a different number..then sums up all the number they entered.. how do u do that?

  • @migthygarfield67 From C# experience on something like this, you would need to have them input the two values first to prevent infinite stack overflow. Say 10 - 100. You will need 3 integers for that. a = minimum b = maximum c = 0 Have it start at a so a++ until it reaches b then stop. c = a + c a = 10 c = 10 + 0 = 10 c int = 10 a = 11 c = 11 + 10 = 21 Essentially that would be the loop until it reaches the maximum. You will need to figure out how to combine this yourself now. GL.
  • So, essentially, it is:

    for (This amount; to this amount; do this change every time it runs this part of the command){do this as the body of the command}

    or what?

  • Can anyone help me I copied the code exactly and it's says counter cannot be resolved to a variable? tnx

  • @IOS2012 Be sure that you haven't put a ";" after the for loop. What I mean:

    for (int counter etc);{ - it should just be - for (int counter etc){

  • 2:36 EQUALS THREE!! xD

  • @kile392jr1 a long time!

  • wow dude ur better than my university lecturer!

    he takes like an hour to teach this bit and i still dont understand xD!

  • @ExtremeColdBlizzard

    you learn these basics on university? lol

  • @devilazpl I think he means college

  • @devilazpl you learned english!?

  • @js7vgd

    no sry i didnt... yet

  • @kile392jr1 You should keep a notebook like i do and summarize each lesson

  • @kile392jr1 make "counter++" to "counter- -" (<---Thats 2 minus signs) so, if you do that then you get an infinite loop. it will NEVER finish :D

  • Comment removed

  • Even though I've learned these basic things at school, I still like to watch your tutorials all the way through. You are a really good teacher.

  • Your voice reminds me of Trip from Star Trek: Enterprise.

  • Hello everyone,

    Can anyone help me explain why you have to write "i == first-1" in the for loop?

    This code is suppose to print out the number of "*" you entered for the first.

    for (int i=0;i < first;i++) {

    if (i == first-1) {

    System.out.println("*");

    }

    else {

    System.out.print("*");

    }

  • Keep pressing 4 .

    Bucky is like Oink Oink Oink Lol.

  • Comment removed

  • Comment removed

  • Hey cud you tell me what program you use for program writing it will be greatly appreciated thx mayn

  • @blinks02 Eclipse.

  • @blinks02 It's Eclipse, btw he's explaining it in tutorial 2

  • @blinks02 Tutorial 3*

  • when u say while it sounds like wow :P

  • when u saw while it sounds like wow :P

  • @BearZzZz1 or change counter to 1...

  • @BearZzZz1 that will output that 501 times :O take away the equal to part

  • got this errors on the codes that you sent.. please help me on this.. thanks in advance! C:\test\hello.java:3: cannot find symbol symbol : class Scanner location: class apples Scanner input = new Scanner(System.in); ^ C:\test\hello.java:3: cannot find symbol symbol : class Scanner location: class apples Scanner input = new Scanner(System.in);  ^ 2 errors
  • for(int counter=1;counter<=100;counter­+=10){ System.out.println(counter/10)­; }

    hehe

  • teacher: write on the board "i wont talk in class again" 500 times, that'll teach you the lesson.

    student:

     for(int counter=0;counter<=500;counter­++) { System.out.println("i wont talk in class again"); }

    problem?

  • @BearZzZz1

    Yes there is a problem, 501 times not 500 because of <=

  • @BearZzZz1 I would actually love for that to happen. So much.

  • @BearZzZz1 That would actually print it 501 times.

  • @LordJogaBonito The more the merrier?

  • @LordJogaBonito wow owned.

  • @LordJogaBonito No, it would just stop at 499, cause it starts at 0.

  • @LordJogaBonito that's what i thought and i was gon reply the same thing without realising that it was already the second top rated comment... lolz.... good on ya....

  • @LordJogaBonito Then you sure showed your teacher!

  • @BearZzZz1 If you do that, you would get 501 messages!

    Go learn you'r lessons! :P

  • @BearZzZz1 That would be 501 :P

  • @BearZzZz1 HAHA OMG SOO GOOOD!

  • @BearZzZz1 you have set the counter to 0 so it will start at 0 and not 1 that is how u are getting it print 501 times

  • @BearZzZz1 In coding everything starts at 0, so LordJogaBonito is right :)

  • please help me come up with this output:

    Enter how many times you want to add : _________

    Enter number: ___

    Enter number:____

    ......

    The sum is:____

    Would you like to add more? [ 1/0 ] >>___

    ( if 1 - it will prompt you and ask the user from the original screen. and if 0 it will exit ).. thanks in advance

  • @thenewboston how can you make the out put 1,2,3,4,7,8,9 ... the 5,6 will be not seen.. plss teach me.. ty

  • @RICHMORE2007 2 for loops. one forloop that goes from 1 to 4, another that goes from 7-9.

  • @RICHMORE2007 You must differs between 5,6 & the rest of the numbers so here's an idea...

    for (int counter=1; counter<=10 ; counter++) { if ( counter !=5 && counter !=6 ) { System.out.println(counter); } }

    Like that .. Hope It helped!

  • @FBPcartong try that and it doesn't work without its fellow friend <, no likes for you am afraid -_-

  • Man java and C language are sooo similar...just a few up downs....ReST Is sAME!!!...

  • @Deathangelhj Most languages are. PHP is also using quite a lot the same logics :)

  • i must be loosing my mind what does counter++ mean again

  • Comment removed

  • @TheNinjaofawesomness it means counter +1.

    so when he changed it to +=3 it would plus 3 each time it goes thru each loop until it finishes.

  • Sorry If that sent with spaces instead...

  • Lol Here's what I put to practice this:

    public class Class1{ public static void main(String[] args){  int PowerLevel = 0; for(PowerLevel = 0; PowerLevel <= 9000; PowerLevel+=1000){ System.out.println("Power Level: "+PowerLevel+"..."); } System.out.println("Your Power Level is OVER NINE THOUSAAAND!!!"); }

    }

  • if int counter= 1; counter <= 10; why does the loop keep going until it reaches 10??? the moment counter turns 2, its being less then 10..So I guess it should stop. Any help guys??

  • @valzameck324 The loop stops when counter<=10 stops being true, which is when counter=11, so it doesn't print anything. I had to look up a better explanation of what the parameters do.

  • @MisterM2402 So if that the case, is it the same to set counter ==10 ? I mean, why would you set it <10 if at the end it's has to reach 10 anyways (the =10 part..) ??

  • @valzameck324 If you had it as counter==10, as soon as that condition stops being true, the loop terminates. Straight off the bat, the loop stops because counter is initialised to 1, which isn't equal to 10, which means counter==10 has stopped being true (though really it has never BEEN true haha). If counter==10 (or whatever condition you have there) starts off as being false, the loop has reached it's "goal state" before it starts and doesn't need to do any more. :)

  • @MisterM2402 ahh, Thats what I needed to know!!. Thanks a lot dude :)

  • simple and awesome sir :)

  • i like how most vids get less and less veiws from people giving up

    "AA is for quiters"

  • @ChillinWithTym *quitters lol

  • double works better

  • apples and tuna... the foods of java

  • @TheSplodeZone I like to drink java while eating apples and tuna.

  • 4 people are jealous of java being able to count to ten.

  • oh shoot. i put a minus instead of a plus and i CANT STOP IT FROM RUNNING!

  • There are 85K views and only 372 likes, this is effed up.

  • it doesnt recognize the variable 'counter' -_-

  • public class apples { public static void main(String[] args){ for(int counter=1;counter<=10;counter-­-){ System.out.println(counter); } }

    }

    try this. it's fucking awesome.

  • public static void main(String args[]){ for(int tutorial=22;tutorial<=87;tutor­ial++){ System.out.println("Tutorial " + tutorial); }  }

  • for loops are for if you know were you want to go to, the main diffrence it the increment argument that lets you select how many "per step" you want to go as well.

  • Thanks for the responses .. virtual integration is good

  • Make a program as this and send it to someone ... xD

    class loops { public static void main (String Args[]){ for(double counter=1;counter<=10000;count­er+=0.0000000001){ System.out.println(counter); } }

    }

  • @2kGamerR Wow.

  • @7thdeadlysin :

    Use System.out.println("*");

    Should work.

  • If i want to use *'s instead of numbers for my counters, how would I do this using for loop?

  • @Alexanderstuve There is a wrap-around with some primitive types, you may be exceeding the limit.

  • been curious for a while.. what font does bucky use for eclipse?

  • @ar4youready Um that's the default font. (courier)

  • @thatbennyguy Thanks! And not on Mac apparently :/

  • hey new boston... can you show us how to combine other statement? Can you show us more? like tutorial 22 part 2... more advance for loop example..

  • how do you display the result horizontally?

  • @redfoxarts System.out.print(counter + " "); instead of System.out.println(counter); .

  • @redfoxarts Just omit the newline characters and use a space instead.

  • {System.out.print ("thank you, ")

  • hey i have a question what if i wanted to start at a specific number ex: 100 and go backwards? so I wanted to subtract instead of adding what symbol is it? i tried the subtracting symbol - but it didn't work

  • @ShadowMysticWarrior try

    for (int counter=100;counter>=0;counter­--)

  • @ShadowMysticWarrior, you've got to use i-- in the same way you use i++. But make sure you set the initial i to the max.

  • lol you're funny when you cant think of the word to say, or when you type something wrong and say 'deal with it'

  • These tutorials are great! Every time I see a 4 min video, I think "this is going to be long," but it goes by so fast, and I understand everything immediately! What would we do without Bucky?

  • for (like=0;like=9999999;like++)

    ohh yeah!

  • @FBPcartong I'm sure this has been said in the last 3 months since you wrote it, but your coding is wrong.

    It should be

    for (like=408;like!=9999999:like++­){}

  • @DMBishin

    no, your coding is wrong too.

    i'll use the number of likes that you used to show it even though it's different now, it should be

    for(int like=428;like=9999999;like++){­}

    you used a colon which will make an error

    and you didn't declare your variable in the starting statement,

    if you don't declare the variable, then 'like' will be underlined and it will make an error because it doesn't know what like is.

  • @FBPcartong hahaah// nice one...

  • @FBPcartong for (like=0;like>=-1;like++)

    OHH YEAH more :D

  • @FBPcartong

    String like = "ENDLESS!!!! LIKES!!";

    System.out.println(like);

    System.out.print("We are such a nerds..");

  • Comment removed

  • @Playsim1234 why would you want to give it .5 like? it an int

  • @janvoslos Lol! Try run that code ;) It will continnue "like" to like 1000000000000 or something :) Becouse so long it is over 0. As it is in the beggining! So it will countine so long that the "double" can handle it! ;)

  • @Playsim1234 ah! smart!

  • @FBPcartong you mean like<=9999999

  • @FBPcartong

    You can"t ;)

    It needs to be

    for (like=0;like<=9999999;like++)

  • @FBPcartong I assume you mean like==9999999 :D

  • @FBPcartong FTFY for(int like = 0;like=9999999;like++);

    if(like = 9999999){

    System.out.println("All the likes thenewboston deserves!");

    }

  • @JsmithTV

    if(like == 99999999)*

  • @FBPcartong I like using Maize, and naming the objects "MaizeObjects" So when my dad is reviewing the code (He teaches me too) He's like, What it Maize ? and i can just say "Corn"

  • @FBPcartong Doesn't work :P

  • You Sir bucky... are the WIN!

  • yeah! thanks for this dude a quick refresh about for loops. this will be coming out in our exam tomorrow! :)

  • Thank you for the tutorials, you've helped me out alot. Your a better teacher than mine.

  • Comment removed

  • YAy!

    i made my first program that could be useful!

    it's a calculating thing that turns numbers into a 8-bit binary code :D

  • good man helped alot through my exam comin up tommorw..:)

  • @TehGameMaker: Thnks for your help... I'll download it... Thnks again... :)

  • What software did you use, I downloaded a Notepad++ and I found it easy and comfortable to use. But it seems you're using a CGENIE in this tutorial? plz reply...

  • @Decgaid06 its called ECLIPSE. its free, definitely worth your time.

  • Comment removed

  • I have netbeans and i love it is eclipse better?

    

  • @0YellowSubmarine0 I have netbeans and i LOVE it as well.

  • @0YellowSubmarine0 ..I find Eclispe to have a more streamlined interface than Netbeans.

  • @0YellowSubmarine0 Eclipse is very streamlined and easier to use, I find.

  • dude u rook

  • @TheMugiwra he rooks?

  • This seems kinda useless...

  • @TheXRealXBrapp Let me describe why. Why do you have to set the increment? Why would you ever need to change that? Why not just change the second parameter?

  • @TheXRealXBrapp For loops are brilliant... You use the variable, in this case "counter" but I always use "i" myself, with your arrays. When you learn about arrays you'll see why these "useless" for loops are necessary.

  • you really cant be thanked enough for these tutorials, great job !

  • is this just for numbers? or in what other ways could I use this?