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

Link to this comment:

Share to:
see all

All Comments (430)

Sign In or Sign Up now to post a comment!
  • c'mon man, u didn't use ur System.out.println(counter++); like we just learned! :P

  • What can kind of games can you develop using java?

  • @107makoto1

    every, from android, to flashes, to xbox using OGL,

    but if you wanna create games for PC, id prefer to take care of C++

    90% of low-level graphic libraries supports only c++

  • Comment removed

  • Comment removed

  • can anyone tell me what to use if i want a categoric variable (words)?

  • @vloglab1

    you have to use String var

    String text = "LOL";

    if (text == "Crash") do somethin

  • Hahahaha as I do clicked run before adding the increment method infinite loop XD

  • @TheHoboshowz Me too!! I was like.. I MADE INFINITE ENERGI!! :P

  • Vote up if your coming here for making Minecraft Plugins :D

  • lol i accidenlty ran it without telling it to stop and i couldent get it to stop lol :P

  • @Cobezzz click terminate button

  • if you keep getting an endless loop you need to terminate the program that is already running on the console. the terminate button is the red square next to the X

  • Thumbs up if you tries it with -- and didnt know how to stop the endless loop

  • Hi,Thanks for posting these videos, very helpful. Thank's again and don't bother others, they just jelous.

  • what happens if you change the position of counter++ and system.out.print(counter)?

  • Comment removed

  • try this one

    while (true)

  • reminds me of lua

    "while true do"

    fucks up everything yo

  • Bucky, is there a way to end the loop only, when the user inputs a certain word or statement, kinda like a password? And is there a way to delay the timing between each loop?

    Thanks

    YOU RULE!

  • i have tried something but no matter what i do i cant convert a scanner input to the counter!!!! this is what i have but i cant change it

    import java.util.Scanner;

    public class Whileloop { public static void main(String args[]){ Scanner INPUT = new Scanner(System.in); String SOL; SOL = INPUT.nextLine(); System.out.println(SOL); int counter = SOL; while (counter < 50); System.out.println(counter++); }

    }

    it gives me an error on int counter = SOL;

  • you could have put System.out.println(counter++) ^^ thank you for being the first person to make me understand code :D im so proud of my self for finding you (and you makin these vids understandable ^^)

  • Thumbs up if you typed counter to its max (which is 1999999999) and watched it go the whole time!

  • 1: Copy what bucky did.

    2: Replace 0 with 1001

    3: Replace 10 with 1000

    4: Run the program

    5: Wait

    

  • @mariosunshinefaan it takes like half a sec >.<

  • @dragonthewatcher Then you did something wrong. Or I told you to do something wrong...cuz it SHOULD just keep on going up forever.

  • THANK YOU!!! I've never understood loops and I have my first semester programming exam on the 6th D: Will be cramming your tutorials into my head for the next few days...

  • hmm... Should we comment on the codes as we go through this tutorial...!?

    Any thoughts, guys !?

  • amazing

    thanks bucky , you are the BEST

  • Exception in thread "main" java.lang.NoClassDefFoundError

    what is it?

  • @ZraxTheBigStuff its just saying that there is a problem in the main body

  • now i can make a calculator!

  • To save some space you could also just do System.out.println(counter++); and it will increment it after it prints it out, great tutorials though!

  • @FroogleGeek oh hahahah i just realized you said the same thing xD

  • true = false

  • false = true

  • it is wonderful

  • When I type the syntax while eclips buts a red X next too it stating that it should not be there why?

  • thank you very much ^ ^

  • Bucky, you got some 'splainin to do...After getting a loop, I terminated, deleted the old project, started a new one exactly the same as yourn, ran it, got an Error message, but proceeded anyway, and it worked. Reset the variable to 100, ran, got an Error message again, but proceeded, and it worked. Why the Error messages? There are no X's anywhere...

  • Bucky! You need to warn us first!

  • TERMINATE! If anyone else has started a loop, like me....there is a RED box, like a stop icon on a video player, that will terminate the loop. It is in the menu bar in the window where the loop is running.

  • oops...got a loop of zeroes that won't quit, even after deleting the project. what now?

  • I fucked up on this and crashed my computer.

  • I'm trying a few things on my own, I've deleted all classes making the project empty, and when I try something, it says something about the apples class as an error. The apples class is something I used working through these tutorials, any help?

  • Nevermind I found the terminate button :)

  • Oh no... I wish you told me not to put a real big number :/ Now it won't stop going up untill it reaches "2147483647". Wow, guess I'll make a sandwhich whilst waiting.

  • class apples {

    public static void main(String args[]){ int counter; counter =1; while (counter < 999999999) { System.out.println(counter); counter ++; }

    }

    }

  • what just happened?

    

  • it saves heaps of time with this code

    class apples {

    public static void main(String args[]){ int counter; counter =1; while (counter < 999999999) { System.out.println(counter); counter ++; }

    }

    }

  • dude....i love you :)

  • Comment removed

  • So, a spam bot? xD

  • @iGetPoints can this be used in lets say.. idk a message spammer trololololol

  • now we know how to make a script to crash something...

  • @Julzso23 lol

    

  • i like it:)

  • 12 people have issues

  • int bucky = 0;

    While (Bucky <= Chucknorris){

    bucky++;}

    Console: 1

    Wow bucky thats pritty good.

  • @shipmaster4000 haha :)

  • @shipmaster4000 Hey, you watch this too, friend? Same! Im making a 3D game!

  • 12 people are very dumb

  • I went to type in:

    while(counter < 10)

    and accidentally typed

    while(counter < 999999999999999999999999999999­9999999999)

    :D

  • Put counter--;

    let the few seconds of entertainment ensue

  • bool bucky = true;

    bool beast = true;

    while(bucky == beast)

    {  System.out.println("BUCKY IS A BEAST!!");

    }

  • Instead of writing

    System.out.println(counter;)

    counter ++; you can write

    System.out.println(counter++);

    

  • @MrEmil20 or he can just write counter = counter + 1. But he reduced that step into counter++. He is being understanding toward beginners.

  • Thumbs up if you're here to learn how to make your own game(s)!

  • I thought I'd have a bash before you showed us what you were going to do, I made this.

    import java.util.Scanner;

    class apples{ public static void main(String args[]) { int counter; counter = 0; while (counter >= 0){ if (counter >= 10){ break; } System.out.println(counter + "."); counter++; } }

    }

    Basically the same as yours, but I used a IF statement to stop it. C:

  • @Nerdpuff why did you import a scanner? just curious

  • @MrStropwen Had it imported from another tutorial. Didn't need it in there. :p

  • @Nerdpuff  okay :D

  • thumbs up if you press ctrl + s everytime you change something xD

  • So.. afterwards I just typed in "counter--;" instead of ++.. and the program's at -4000000 right now and counting. going down. XD

  • Im 11 and im learning, i already know alot of actionscript 2.0 and now a little of this

  • how many years did u go to college for this lol

  • @Game2Gaming I doubt he learned how to program in college. I learned my first programming language at 14.

  • @Vapula909 Yup. I'm 14, and I totally love programming :D And more and more of teenagers begin to participate in computer projects. :P

  • Terminate button FTW!

  • My eclipse is spamming 0 and I didn't wait until he said now we need something to end it.

  • I'm not here to be another minecraft person - I'm here to learn Java to jump into making apps into Android, which is set to take over the Iphone next year. Go Android!

  • please stops saying curly braces those are braces

  • @bigjust12345 who cares what he says? stfu and watch it

  • @AZNmanJJ it is not him it is just so annoying when everyone does it and it is a quicker to say brace

  • This is what spam bots are made of...

    example:

    just ask what to spam whit the user input,then just loop it XD

  • I somehow knew you were gonna do < 10

  • good man

  • if this is your first time you should do somthing like BYOB.It will help you getting the concept in dont jump in to somthing like programming.

  • MC MOD: peaceful mode with monsters, go to the programming of normal and hard and put a while loop to

    while(hearts > 0){

    !!add to the hearts variable here!!

    }

  • iml learning this so i can make plugins for minecraft bukkit server :D

  • did you made the java script?

  • I accedently started the program without the "counter++" and I paniced cuz I thaught it wold run forever!

  • Hi

    Wgy did start in tutorial 14 using String[ ] args instead of String args[ ]. Is it a typing mistake? thanks

  • @misshana94 You can put them in front of String or infront of args it doesnt matter.

  • thanx man

    

  • You know what's also pretty cool? you can make a program where it spams what u say . however many times u want it to. good vid man :)

  • hi bucky (or someone,) i got a problem whit my program, its a *guess the number* program that works fine exept one thing, i let it create a random number wich is stored, then i use i while loop to be able to type in the guess, but it let me type it twice, and ideas of how to solve this? my while loop is like this

    while(input.next() != null){

    and my guess (wich i call tuna ) is like this

    tuna = input.nextByte();

    the problem is that both let me input text

    if some help, email me for full class

  • good[iminent=FHLkhAgUWfOB]

  • Im gonna go get ice tea, then do the next tut.

  • what software are you used?

  • Bucky is probably Notch in disguise!

  • @tommyboii090 Wow. He must have one epic voice changer...

  • @tommyboii090 He is too good to be notch, perhaps he is Jeb.

  • @12me91 Lol

  • Comment removed

  • haha fu** computer lag as hell :D

  • thumbs up if you set it to count to 2000000000 by 1's =)

  • Hey nice video! I happen to like programming. My team and I are making a website coming soon. Please visit my channel to see more about it!

    Really though, nice video.

  • HELP! I MADE IT LOOPS WITH 0!

  • Haha i used 1000000

  • thanks!

  • you're amazing

  • I used the number 500000000

  • What is different of public class apple and class apple?

  • books on java for pussy...

  • At the first place i came here to learn to make mods for mc and thats all i wanted to learn the basics but now i wanna be an advanced java programmer and hopefully make my own java game and ..work with programming :) thanks bucky cuz i think you opened another door for my future.

  • guys make it <1000000000

    and dont ask meh what will happen :D

  • Thumbs up this comment if your going to stop giving people who ask for thumbs up.

    Or are you going to thumbs this up? ^.^

  • @CreeperGB no im too lazy to do it

  • @999narmo Good ;o

  • @CreeperGB i guess :S

  • @999narmo XD you see that i got to many negative votes! awesome

  • @CreeperGB maybe they was too lazy to move the mouse to click the thumbs up

  • @999narmo nonono as u see getting thumbs down is what i wanted ^.^

  • @CreeperGB i guess everyone is happy :D

  • thumbs up if you are here to make minecraft mods!

  • Now I can't end the program >.>

  • Thumbs up if wanting to make a custom client for Minecraft led you here :D

  • i love this

  • I'm really getting good at this, i didn't have a single error in the code this time.

  • i like when i can thumbs up before video has a chance to load and know i wont need to thumbs down...lol good job man

  • the interesting things about these videos are reading the comments

  • try putting while (counter > -10)

    for a never ending loop

  • TRYING THIS TO 10000000000000000000!

  • watch it with transcribe audio on, i lol'd

  • at the end change the ++ to -- and watch it go to 1000 in like 1 second lol

  • This is like C++ but less efficient. I'm only watchin this because I want to get your "Java game programming tutorials"

  • I was here for it up until the 3rd vid now I just wanna code

  • i am lolz

  • anyone here for minecraft?

  • @stupidmonkey199 i would like to learn java because minecraft was programmed in java.... i love minecraft

  • @PurpleSpawner85 I want to make mods for it :D

  • @PurpleSpawner85 actually these tutorial wont help much on minecraft unless your making a gui interface. you can tlook at tutorial section on minecraft forum. there you could learn minecraft java. what ı mean how the blocks and items are created.

  • @ashleybeshir Actually this helps you understand minecrafts coding ALOT. minecraft java is just java with different variables.

  • Comment removed

  • @PurpleSpawner85 HAHA! minecrafts java is pretty much all codes....good luck with that

  • @PurpleSpawner85 tzz minecraft ^^ i learn it because i do java in the school

  • @PurpleSpawner85 me too dude!

  • @PurpleSpawner85 Exactly why I'm here :)

  • @stupidmonkey199 ;P maybe

  • System.out.println(counter++);­

  • Lol, the term for conditions that go between parenthesis in a method are called "Arguments". Just in case it slipped your mind.

  • i cheated with typing sentences. they said no copy and paste so i didnt

  • If someone ran the code without the counter++, click the run box to the right of the console.

  • Warning: Don't type in 5000000000000000.... >_>

  • @onon6 That's part of my goal with this too :P

  • looPINGAS usual I see

  • Dear youtube,

    I have discovered a serious problem with this video: an error that must be removed. There appears to be a dislike button below my video. This is a serious issue that must be handled immediately! - Sincerely-- future programmer.

  • is counter just a variable? Could he put "tuna" instead of counter?

  • @EarthWorms77 yeah he could've used tuna instead, it just makes more sense to call it counter ;)

  • @EarthWorms77 Yes it is... He sad in the beginning of the video: "The first thing that we need is a variable and I'm gonna name mine "counter"... Also in the previous vids you could learn about Variables.

  • @Whisperer512 thank you

  • @EarthWorms77 Yes.

  • Could someone tell me what counter++ did ??

  • @1ncr3as3 added one each time the loop went round so the first time it was set to 0 which was under 10 so it displayed that then the next time it added 1 more 0+1 is 1 and one is under 10 so it displayed that too it does this until it reaches 10 which isnt displayed because its not lower than 10

  • @1ncr3as3 counter++ increments the value of counter by 1 and saves it in the same variable i.e counter. So for example if counter = 1 , then after counter++ counter value will be 2.

    Watch "tutorial 9 increment operators" for more clarity.

  • @1ncr3as3 ++ means add one to the variable, he explained this in a previous tutorial.

  • @1ncr3as3 Wow I thought I had a bad memory...

  • im already havin trouble rememberinn all these

  • Can't wait for my first mc mod :p

  • A lot of this stuff so far looks like simple stuff from AutoHotKey.

    But written in a more complex way.

    So far I'm learning this stuff pretty well. :)

  • thumbs up if you to thenewboston to continue the java game programming tutorials

  • The extra line "counter++;" is not needed. Use :

    "System.out.println(counter++)­;"

    Save time

  • :)))

  • you explaination is very well and easy to undrstand

  • i change the ++ to -- and now i get a matrix code!!! it looks cool!

  • who goes to tutorial 13 and then dislikes?