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

Link to this comment:

Share to:
see all

All Comments (779)

Sign In or Sign Up now to post a comment!
  • Life saver. The textbook that I'm trying to use does not explain this at all.

  • Hey Bucky, I transferred schools and I was WAY behind in java... now I'm up to speed, thanks to you!

  • Hey thanks for posting these, your videos gave me the ambition I needed to start learning Java. Thanks!

  • Math haters you are on the wrong place

  • @The3DMachine Please elaborate

  • Im Here Because im 15 and this is what i wanna do. from me learning alot but not all of C++ This is mad easy. I Wanna make video games and i understand you need your basics first. If Runescape botting comes back i attempt to make a bot then. And need Unity3d. and C++ made java. so really java is C++ but easier and i like it more.

  • why not use

    JOptionPane.showInputDialog("?­?");

  • hi guys ...

    remember there are a lot of things in java that can't be used if we use small letters like "Random, System, Scanner, String and so on ...." they should be capitalized.

  • Pay Attention!!! 2:52

  • it says that 'java.util.Scanner' is wrong, what is wrong with it?

  • @bogey134

    import java.util.Scanner

  • @bogey134 maybe you forgot the semicolons ;

  • @zaidalyafey nah, it's because I named the class 'Scanner'

  • hi what is mean for;

    import java.util.random;

    ??

  • @MrSantaiii

    it is java .util.Rnadom; with capital letter for random

    and it is basically for generating random numbers.

  • im using bluej and i have an error message that says it cannot find symbol - class scanner. btw never said thanks but u taught me everything about c++ except for graphics which im trying to figure out but i will probably just learn obj-c from you and fuck around in the quartz composer in xcode. but thanks man my weak ass class in 9th grade doesnt do shit. the teacher thinks i get my code from the internet cuz we are almost 4 months into it and we havnt learned loops or logical operators.

  • @SirMrMcMsMrs Is your Scanner starts from a capital S?

  • All hail bucky!

  • hello How do you run java program using an applet? Thanks

  • thumbs up if ur ass hurts

  • Remember big and small letters.

  • OMG NVM I REALIZED I WAS DOING uRil not uTil IM STUPID -_-

  • i cant get it to work and i did it PERFECTLY :(, ill keep trying...

  • help me please mine says

    the import.java.until.scanner cannot be resolved ???

  • @PurpleDesigns util not until mate :)

  • LOL I was really scared when you said "Pay attention!". XD

  • Comment removed

  • I have no idea what he is talking about but if i copy what he says

    it worka :D so easy to learn :D

  • all your tutorials sink in right after i see them its awesome!

  • why not skip .nextline() after scanner bucky in the 6th line ,and how to print the output on the same line besides the entered string by the user please reply anyone

  • @COD5252 i don't understand what your saying, but the .nextLine part tells it to look for the users input and check it for the line i think. and by enter it you mean like

    System.out.println("Something" + something1)

    where something one is the scanner, and something is just the print. of course you probably know that already.

  • @COD5252 I understand your question, but also I am wandering and trying to achieve the same thing, if you already discover how to do that please answer me.

  • :D

  • I love bucky he taught me a lot :D

  • I <3 these tutorials

  • Comment removed

  • Wow! I decided to watch your videos just for fun, i would consider myself good at java-programming. But you have learned me things i didn't know! I will watch every one of these videos, maybe instead of finish reading my java book, and yes, it is a good book, but this is even more helpful.

    You are really good at teaching, you should write a book or something.

    THANK YOU!

  • I could not get the eclipse run to work so I had to use the cmd but after that it worked fine.

  • lol Im Lost

  • this guy is awesome in teaching , Thanks to him i find easy to learn in java ... thanks @thenewboston for all this awesome tutorials, i subbed to you , you are the man!!!

  • @thenewboston please helt i have check over my code multiple times and i have java 1.6 but i constantly get the error message: scanner cannot be resolved to a type when running this. Thank you.

  • @macintosh082 If you're using eclipse, make sure eclipse uses JDK 1.5 or higher to compile the file. If it uses 1.4, it won't work since scanner didn't exist back then.

  • can I haz scanner?

  • thanks man...

    

  • hey bucky im getting a java exception error when i try to run the program idk wts wrong am i doing here i did exactly how u did import the scanner enter the value for the variable help me out here man thnx

  • @tahaaaa ok my bad i got my answer thnx for helping out man it really helped!

  • When I type in something my scanner.readLine() hangs forever... doesn't matter what I type in anyone have any ideas. I've looked all over the internet and can't find anything relevant! Getting frustrated here.

    Oh I'm using ANT to build the project, could that cause an issue?

  • hey now!... very useful...

  • hello, can someone please help me :)? I need this for my very first Java program... I tried this:

    Scanner scanner = new Scanner(System.in);

    String input = "";

    while(true){ input = scanner.nextLine(); if(input == "exit") break; System.out.println("*still looping*);

    }

    I can type in anything but it doesn't break :(

  • @dasten123 Scanner scanner = new Scanner(System.in); String input = ""; while(true){ input = scanner.nextLine(); if(input == "exit") break; System.out.println("*still looping*);

    is tis your code???if yes.....tats a program tat almost totaly wrong

  • @dasten123 LOL this code is bound to NEVER break.

    "while (true)" = this means that while "true" is true (which it is) it should never stop.

  • @KimuraSetsuna this is the simplified problem that I have.

    And this piece of code actually works just fine: it stores a line of text you type in. But it only semms to ignore this if statement.

    @KatanaPL in this case "while(true)" is cool because this "nextLine()" thing stops the program somehow till you press the return key

  • @KatanaPL NO SHIT SHERLOCK!

  • I wasted 4 years of my life in college , I swear they didn't teach this.. bloody morons and you're the best bucky

  • One thing i dont understand is why you put the variable in? Is it really needed because you can write anything and it will display whatever you write. My question may sound silly but i dont see what the variable actually does as the scanner part in the main seems to do all the work

  • Holy Crap... 333,222 views :O

  • What is the difference between public class and class?

  • Do NT COPY SOURCE CODE! do it all yourself! you Will Learn!

  • scared me when he said pay attention at 2:52 and i wasn't paying attention

  • lol i was laughing cause I knew what your were trying to say when you said its "noble"

  • looks like a little java messenger for when you get bored hahahah

  • I will love you

  • When you said pay attention i was looking at my tv and you made me look back at the video XD

  • @biocitygames lol, authority!

  • Btw, I meant I have been using MATLAB, I don't want anyone to think that I type these into MATLAB. I have been given ten days to learn JAVA and transfer all my algorithms to it. A Herculian task.

  • Comment removed

  • you are the best teacher ever!

  • Are we going to learn how to make Applets any time soon?

  • Lol does he say pay attention at around 2:51

  • isnt it Public Static void main(String[] args)  ?

  • @jrsyousuck You don't capitalize key syntax..

  • @jrsyousuck Nope.

  • nice but this is a litlle hard to remeber the scanner function

  • Wow, I keep forgetting my semi-colons XD

  • bucky FTW

  • Great Tut

    

  • This video taught me more about the Scanner than my java class in college did :/

  • @12me91 Lolol, java class XD.

  • Comment removed

  • Just so you all know! Capitalization is HUGE on this program, dont forget to capitalize some parts!

  • "Scanner can not be resolved to a type"

  • @IIOGCII

    Java uses a lot of capitalization so whenever you face this error just Capitalize the first letter of the word which is causing the error

    Example : import java.util.scanner --> import java.util.Scanner

    Hope it helped

  • @dragons0305 its not scripting, its coding. and you'll need to get a lot farther than the input tut to mod minecraft

  • I am a little confused. I get to the point where I can input a value to a variable I call "width". But then I can't use this variable and multiply if with another variable, say, 40 for example. What I want to do is simply be able to input data into 2 variables and multiply them. Why won't this work?

    So far, C++ > java.

  • @NuffingHoN type: width = width*40;

  • you can run it with CTRL + F11 too!

  • Sorry you alraidy said

  • Ive followed all your video and they are great, i just started learning java/programming...

    Ive been scared to check how many more tutorials you have done, cant stop watching them, they are great, easy to follow and very newb friendly, fits perfekt for me :)

    

  • @Masterashman there perfect for every new programmer or anyone thats bored out there mind so they wanna lern new stuff on there pc, i dont know why he dosent have like 2m subs.... hes got mine though- and anyone else thinks he deserves more subs, GO SUB HIM!!!!!!!!!!!

  • Man i wish it was just cout ans cin like c++

  • @heavy208 it isnt needed

  • @heavy208 it bring it down to the next line like it was goig to print another line

  • I cant type in the console =(

  • I love watching the views decrease as the video number goes up, seeing all these people giving up.

  • I jumped in my seat when he said "pay attention" randomly at 2:54

  • so many...tutorial...want to make....2d/3d game..

  • @chrisall76 watch them all!

  • @CloudDecim im on tutorial 28,im not stoping now :p

  • @chrisall76 keep going its our dream :D

  • \/\/----- nevermind -----\/\/

  • Exception in thread "main" java.lang.Error: Unresolved compilation problems: Scanner cannot be resolved to a type Scanner cannot be resolved to a type at appels.main(appels.java:4)

    Uhm help?

  • Guys also, i think he should add in video annotations tips that people point out in the comments, that would make the tutorials way better :) .

  • Guys, I removed the nextLine from (bucky.nextLine());

    and still got the same exact result. Can someone please explain to me what exactly nextLine does? I just can't seem to come to a conclusion.

    Thanks!

  • what is he writing this programs on?? i always do mine in notepad and this seems so much more simple

  • @jaboipell He's using Eclipse. go to eclipse(dot)org to get it.

  • @2744spartan thanks!

  • you are a great man mr Bucky.. :)

    .

  • sir it feels awesome learning from you!!

    

  • Wow! 666 comments!!

  • Visit our new forum about programming.

    programmingandmore net

    Enjoy!

  • "Error: Could not find or load main class Scanner"

    can someone help?

  • @dareapa1 Same thing happened to me, check through and make sure you did EVERYTHING write. Plus read what the thing says.

  • Comment removed

  • Comment removed

  • the first step in the spam hack for minecraft and all other games lol

  • THANK U SO VERY MUCH Bucky.. :)

  • @thenewboston you said bucky here is a variable.. but isn't that the object of the class Scanner and bucky.nextLine() is a method of the class Scanner..??

  • i use

    public static void main (String[] args)

    and it works but you use

    public static void main(String args[])

    and it works. How come?

  • @bluestreak711 cuz there r two ways of declaring array. both are good, just a matter of your habit. what u used to.

    u can declare array, either int [] array or int array[];

  • @bluestreak711

    Because both ways define a string variable.

  • following this his c c++ java tutorials these days . tell you what he is a genius !! simple and very clearly explain all more than our college lectures !!

  • MINECRAFT!

  • I think "efficient" was the word I was looking for at the end....

  • @thenewbostonTV NOBLE XD

  • dude your an expert at this

  • Comment removed

  • What program are you using tot ype this in?

  • @internetrush He's using an IDE program called Eclipse i believe :)

  • Does a scanner just print out what you typed last on your keyboard???

  • @lasredchris Yes. Whenever you type something the variable is given what you wrote last and substitute it to the previous one.

  • @lasredchris "Scanner" is an object of methods ("functions"). Look at the first line, it's class is linked there. You could write these methods yourself with other names, other behaviors and such. That's the whole point of OOP. Why rewrite code that's already there?

    Follow these tutorials and focus on how Java programs are constructed rather than how to use some imported methods in certain ways. It's not the main issue in these tutorials. B will show examples and how to make your own.

  • @lasredchris (2) basically in this tuto: System.in method scans the keyboard with eventhandlers. It returns a string as 'enter' is pressed. That "..nextline()" then becomes a string which contains the key buffer until 'enter'. System.out.println prints this string + 'enter'.

    'bucky' is an instance of Scanner with parameters/arguments to be returned by 'System.in'. As long as 'enter' is not pressed nothing is returned. "bucky" waits for system.in and Syso waits for bucky.

  • @Koreman11 is there a way to get input from the user USING INTEGER,DOUBLE AND FLOAT,NOT STRINGS!!???

  • @ChrisTheBest1992 Yes. See thenewboston Java tutorial "simple calculator". It uses integers for input. Further on in these tutorials you'll see that Scanner can also be used to read files from disk. You'll also see how to convert the value of a figure within a string to an Int/Double/...

  • I typed in everything you have correctly except the variable and when i click run the console doesnt come up! its getting really frustrating and if you could help it would be really appreciated!

  • @qwertyuiop1234565479 i got the same problem I think you are experiencing. if you dont got the file to import, you cant import it. u see? To import Scanner. you need the file scaner.jar. witch is placed here. C:\Program Files (x86)\Java\jre6\lib\ext... This is where java looks for extentions or "import" into the program. If it cant find the file you want to import. you get an error. sad but true.

  • Java program of sqfeet to acres ?

  • Im not joking you should be my professor in college in coompootin you do WAAAY better than him i owe you my life

  • hi bucky!!

    your videos are my confidence booster.love you

  • i'm in college... got this in class... didn't get it... I go here... 5 minutes BAM done I LOVE YOU

  • whats netbeans?

  • @ChrisTheBest1992 another java ide

  • @kilkeeper what does ide means??

    sorry,im a junior programmer

  • @ChrisTheBest1992 an ide is the program you code in, in this case its enclipse

  • I accidentaly closed the window in wich I see my projext, how can I get it back??

  • Comment removed

  • Am I the only one who thinks he should be a teacher at a prestigious university?

  • in case anyone doesnt get this. (He might explain it later, I havent watched them all)

    The ; at the end of everything ends the statement.

    Thumbs please.

  • Comment removed

  • <3 Bucky <3

  • Shadowgown a kid can do it im 11 just watching them see where they go before downloading shit

  • I can't import the Scanner, it always gives me an error... Any help?

  • @ShadowgownGaming

    well as you don't give any information about the error I'd say:

    1. check that you correctly wrote (watch for the uppercase): import java.util.Scanner;

    2. Did you create a project... did you create the right class with the default package?

  • @XxTestProfilxX yeah , I did all that, but I managed to get it working, not really sure how though

  • Comment removed

  • bucky, to you i am stucky

    and i will NOT give up until we fucky <3

    i love your tutorials, you explain things in way child can understand! ll the other tutorials, and i really mean all of them out there on youtube.. arent even CLOSE to how you re doing it!

    when i dont understand one of your tutorial video clips, i repeatidly play the clip while play some games on my primary monitor and now/then i take a glance at whats going on etc etc!

    SORRY IM JUST SO HAPPY YOU MAKE THESE VIDEOS!

  • Bucky, you're so helpful and clear. Very good explanations!!! :D Thank you!

  • @therealboston Are you from out west in america?

  • netbeans is my friend.

  • bucky u are just awesum

    i wat to meet u once

  • will he really explain everything? like wtf is "public" or "static"?

  • @umcarainteressante I really hope so...

  • Comment removed

  • Bucky your so fucking awesome!!!!! Thanks so much for these tutorials!! your da best!

  • thanks for the tutorial

  • I get the error: system cannot be resolved to a variable

  • @ziodice Try capitalizing the first "S" in "System"

  • @GuppyAssassin Thank you, I looked into it a little, and that was deffinately the problem

  • @ziodice Glad I could help :) I was having the same problem myself :P

  • I forgot a semicolon, I spent about 10 minutes saying, WTF IS WRONG?!?!?!?

  • in buckys name we can either put anything

  • good luck with the Android apps

  • what does the new Scanner part mean. why enter that in and not just scanner bucky = system.in ??? appreciate feedback

  • guys remember those pesky semicolons

    usually thats what is the problem

  • never mined fixed it

  • it says scanner canot be resolved to a type please help