@gyngrbred This was just an example. Normaly, you probably want to have like complicated numbers as variables. (when i say complicated, i mean that it makes it look pro.)
class apples { public static void main(String args[]){ double answer_to_life_universe_and_everything; answer_to_life_universe_and_everything = 42; System.out.println("Whats the answer to answer to life universe and everything?"); System.out.println(answer_to_life_universe_and_everything);
I know how you store a number variable in an abc variable but how do you store an abc variable inside a number variable? With that knowledge I could create a lot more things.
he forgot to mention the ; symbol.. because you are on a compiler you can't finish your line of code (or sentence) with a period. the compiler will be confused and mistake it for a decimal. therefore to end your line you use a ; symbol. thats all.
public class Variable { public static void main (String args[]){ double OVERNINETHOUSAND; OVERNINETHOUSAND = 9000.001; System.out.print("I NEED "); System.out.print(OVERNINETHOUSAND); System.out.println(" SPARTA KICKS");
public class Variable { public static void main (String args[]){ double OVERNINETHOUSAND; OVERNINETHOUSAND = 9000.001; System.out.print(OVERNINETHOUSAND);
If "double" is what you will put before a number with decimals, what do you put in, stead of "double" if you want a number without decimals, and/or if you want a word instead of a number?
@kidharris55 oh no! that doesn't make me feel good lol. I first learned python (which is easy and makes sense to me), now learning Java (second time through these tuts, dont like how I have to declare all the variables where in python it automatically did it but I assume Java is more complex because it is more powerful, no?), next I was going to learn C++... oh well, guess I'm going in the right order then :p
@TheModernKillcam I'm not learning this for minecraft, but I will use it there :P and what I am learning this for is a game to make and run on minecraft's engine.... minecraft FTW
@hobosmurf I strongly recommend you not to do any operation when your printing something, it's way better to do it before, saving the result and then display it on the screen
System.out.print("enter a numer: ");
int number = console.readInt();
if (number > 9000)
{ System.out.print("it's over 9000!!!!! ");
}
Get this to work and it's awesome
Try this.
badboarder4 20 hours ago
Great Video man!
ReeceTheComputerGeek 1 day ago
I love you! (No homo)
daytdog 1 day ago
Instead of adding all of those
system.out.print(variablehere);
system.out.print(othervariablehere);
You could just do
system.out.print(variablehere + othervariablehere);
MaximillionTheYeti 6 days ago
apples and tuna
raydenovo 1 week ago
i have some a so how can i print the word tuna if i have a variable called tuna?
gyngrbred 1 week ago
@gyngrbred This was just an example. Normaly, you probably want to have like complicated numbers as variables. (when i say complicated, i mean that it makes it look pro.)
flatballoon45 3 days ago
int
double
float
boolean
String
...???
gustavboll1 1 week ago
@gustavboll1
int: integer - used to represent "whole numbers" only.
double: double-precision floating point - used to represent any real number.
float: single-precision floating point - used to represent any real number.
boolean: used to represent basic truth value (true or false)
String: used to represent literal statements such as "movies" in this video.
There are many other primitive types as well. Google "variable types in Java".
TheBlackDeath3 3 days ago
@TheBlackDeath3 i know but do it exists more then
byte,short,int,long
float,double
boolean
String
gustavboll1 3 days ago
You are awesome. Thanks to you i finally get the purpose of variables (hope i spelled that right).
DiamondCrackers 1 week ago
Thanks from Ukraine!
SpaghettiCatalyst 1 week ago
I have watched 5 of your Video's. They are extremely good. I have looked at various java tutorials,
and yours are the best. I was struggling with java until I watched your video's.
Keep up the good work.
Thanks
Bob from England.
rcosnett 1 week ago
This has been flagged as spam show
class apples { public static void main(String args[]){ double answer_to_life_universe_and_everything; answer_to_life_universe_and_everything = 42; System.out.println("Whats the answer to answer to life universe and everything?"); System.out.println(answer_to_life_universe_and_everything);
swizzazn 2 weeks ago
Comment removed
swizzazn 2 weeks ago
2+2 =fish
danielmcgarrity2 2 weeks ago in playlist More videos from thenewboston
Why do you always have to include food?
PolitePuppy2313 2 weeks ago
Thanks bro!! ;-]
FabioStream 3 weeks ago
What abbot the other variables? What are they called? How are they used? That pissed me off how you didn't even say what they were
UltraDrago2000 3 weeks ago
@UltraDrago2000 What other variables? There are no other ones.
ethan1581 1 week ago in playlist Java (Beginner) Programming Tutorials
lol you say back in seventh grade and im in seventh grade :P i like your tutorials their very detailed. +1 subscriber :)
Snipeshot286 3 weeks ago
How come when i run it it only says tuna
MrDestracto 3 weeks ago
@MrDestracto did you put the tuna in quotes? like so
system.out.print("tuna");
take off quotes.
mafiameower 3 weeks ago in playlist More videos from thenewboston
I know how you store a number variable in an abc variable but how do you store an abc variable inside a number variable? With that knowledge I could create a lot more things.
bluestreak711 3 weeks ago in playlist Java Programming Tutorials
he forgot to mention the ; symbol.. because you are on a compiler you can't finish your line of code (or sentence) with a period. the compiler will be confused and mistake it for a decimal. therefore to end your line you use a ; symbol. thats all.
good tut
DICKCHINHARY 3 weeks ago 17
in school java is so boring but with your tutorials its so much fun!
JakobRobert00 4 weeks ago
why not use
JOptionPane.showMessageDialog("My favorite number is: " + tuna);
BetaHatHack 4 weeks ago
JW but cant you do System.out.print("I want " + tuna + "movies");
GModPlyr 1 month ago in playlist The New Boston Java Tutorials Bucky
Tuna is the best variable name ever.
TeamTunaHDD 1 month ago in playlist Java Programming Tutorials
Comment removed
Zelticon 1 month ago in playlist Java Programming Tutorials
you just helped me with my homework. you're better teacher than my college professor. THANKS
CareyPortnoyBeauford 1 month ago
whole numbers cannot be negative they are the natural numbers {1,2,3.....} plus 0
and they are part of integers that contain all positive and negative numbers.
zaidalyafey 1 month ago
@zaidalyafey negative numbers are integers though...
HitaroX 1 month ago in playlist Java Programming Tutorials
@HitaroX
of caurse they are ,,, but whole numbers are just positive integers
zaidalyafey 1 month ago
Yea, you better set aside at-least 2 weeks to understand constructors.An another to know how classes work. Up till then, your only learning syntax.
trueredexe 1 month ago
I want tuna movies
majsorm1997 1 month ago
I am in 7 grade
barcelonacoolness 1 month ago
It is hard to learn java if you dont speak england so i will go to library and i will be book worm...
Truttixpelailee 1 month ago in playlist Lisää videoita käyttäjältä thenewboston
im learning how to code runescape bots... thank you xD
dddddddd92 1 month ago
Thanks, I didn't know mutch about java until u taught me ( :
allowkid 1 month ago
lol knowing javascript and c++ and vb i predicted how the syntax goes for the for statement the while statements and booleans
THEGAMINGRULER 1 month ago in playlist Java Programming Tutorials
thi sis a stin
CWMlolzlz 1 month ago in playlist Java Programming Tutorials
so simply saying;
double = real number element of R; (examples : Pi, E, ... )
int = integer number element of Z; (3,5,4)
Attention:
if you do 5/2 you get 2; residual divided
if you do 5/2.0 you get 2.5; reeel divided
driesmp 1 month ago
public class Variable { public static void main (String args[]){ double OVERNINETHOUSAND; OVERNINETHOUSAND = 9000.001; System.out.print("I NEED "); System.out.print(OVERNINETHOUSAND); System.out.println(" SPARTA KICKS");
}
}
dragonthewatcher 1 month ago in playlist Java Programming Tutorials
@dragonthewatcher System.out.println("I need "+overNineThousand+" sparta kicks");
the plus is a conjoining operator that allows any data type to be presented in the format of a string.
sesshoumaru3st 1 month ago in playlist Java Programming Tutorials
public class Variable { public static void main (String args[]){ double OVERNINETHOUSAND; OVERNINETHOUSAND = 9000.001; System.out.print(OVERNINETHOUSAND);
}
}
dragonthewatcher 1 month ago in playlist Java Programming Tutorials 31
If "double" is what you will put before a number with decimals, what do you put in, stead of "double" if you want a number without decimals, and/or if you want a word instead of a number?
mariosunshinefaan 1 month ago
@mariosunshinefaan "int"
Cycyryable 1 month ago
@Cycyryable I just found out "int" is for whole numbers. Is it "int" for letters as well?
mariosunshinefaan 1 month ago
Comment removed
k0h26 1 month ago
Comment removed
PhilMcCrack1 1 month ago
What is it with you and apples!!!
ThexKezza 1 month ago in playlist Java Programming Tutorials
@ThexKezza and bannans
dragonthewatcher 1 month ago in playlist Java Programming Tutorials
@ThexKezza and bannans
dragonthewatcher 1 month ago in playlist Java Programming Tutorials
@ThexKezza and bannans
dragonthewatcher 1 month ago in playlist Java Programming Tutorials
@ThexKezza and bannans
dragonthewatcher 1 month ago in playlist Java Programming Tutorials
Thank You Brother :)
Sanket8688 1 month ago
I wish they also taught this at highschool..... but Bucky is still great lol >.<
TzKet4m 2 months ago in playlist More videos from thenewboston
"Don't believe me?", but we do believe you why do you have to proove shit :P
goztepe99 2 months ago
damn, this is c++, but with other names xD (btw i can program in c++) yeey
pietteke1 2 months ago in playlist Java Programming Tutorials
i learned about variables in 6th grade ^o)
xrxt0 2 months ago
dam i got it wrong but eclipse told me what was wrong and boom its working this is what i missed=;
andrewredpsnuser 2 months ago in playlist Java Programming Tutorials
jaba
kazuzuagogo 2 months ago
3:56
30 minutes of learning for a simple program that says 5.28
=\
ultislasher1 2 months ago in playlist Java Programming Tutorials
What font do you use?
Jaikayz 2 months ago in playlist Java Programming Tutorials
oi wait a sec I learned about variables in 3rd grade >:O
ultislasher1 2 months ago in playlist Java Programming Tutorials
"math class back in 7th grade or what ever..."
I'm ten and I'm still in 5th grade (Elementary) O.O lol
ultislasher1 2 months ago in playlist Java Programming Tutorials
In eclipse write syso and press space + enter, thumbs up, so everyone can see!
xJustas 2 months ago
He's a good teacher
Salagarren 2 months ago
Wouldn't it be easier to understand if the "println" statement meant end line instead of print line?
Nanoxenium 2 months ago in playlist Java Programming Tutorials
@Nanoxenium It seems to be a short form for print a line and end it.
wei2912 2 months ago in playlist Java Begainner Programming tutorials
1:41 lol
COD5252 2 months ago
I Know What's A Variable I Learned It When I Done Javascript In HTML
pawelweb1 2 months ago
so a double is basically a float?
OCoptimusconvoy 2 months ago
@OCoptimusconvoy more or less, but floats store numbers a tad more efficiently
CheesitWeesit 2 months ago
@CheesitWeesit so can we still use floats in java?
OCoptimusconvoy 2 months ago
Thumbs up if your going to beat Minecraft with your java game!
fortawesomm 2 months ago
lol learning variables in 7th grade right now! in pre-algebra!
json453 2 months ago
Thumbs up to boost my self esteem! OMG I hate those...
xXTheRush905Xx 2 months ago
You know you're a computer nerd when your favorite number is 5.28 lol
gettlo5 2 months ago 73
@gettlo5 or you know that pi is 3,141592653589 ;)
ps3teb1996 2 months ago in playlist Java Programming Tutorials
@gettlo5 favorite number for physic nerd would be 137 :P
guitarchickcrazy137 1 month ago in playlist More videos from thenewboston
@gettlo5 mine is 3 :3 i have no idea why :3
dragonthewatcher 1 month ago in playlist Java Programming Tutorials
@gettlo5 why?
jeffery1855 1 month ago in playlist More videos from thenewboston
@gettlo5 I don't get it, please explain
solomonchild5 1 month ago
@gettlo5 or a math nerd when your favorite number is 6.28 lol
gatoo23 1 month ago
You messed up the names for the tutorials. 4 and 5 should switch places
Eiglew 2 months ago
you should make a double and call it rainbow
KinzokuKoibito 2 months ago in playlist Java Programming Tutorials 2
I used to know java, then I took an arrow to the knee
ziggybiggyboom 2 months ago
@ziggybiggyboom I used to know java, then I forgot java, now im learning java
KinzokuKoibito 2 months ago in playlist Java Programming Tutorials
I guess you really like apples =D
ThePujs 2 months ago
VB is so much simpler :/
PointBlanc54 2 months ago in playlist More videos from thenewboston
You, my good sir, have a new subscriber!
MalkanorBek 2 months ago in playlist Java Programming Tutorials
Thumbs up if you going to make a simple game with java!
therightpremiums 2 months ago 164
@therightpremiums screw simple :P
OCoptimusconvoy 2 months ago
@therightpremiums No. I'm going to make a MINECRAFT like game.
Theminecraftplayerdd 2 months ago in playlist More videos from thenewboston
@Theminecraftplayerdd Okeay...
therightpremiums 2 months ago
@Theminecraftplayerdd Then why did you say no? Your still creating a game regardless of what it's about.
lukerulez2009 1 month ago in playlist Java Programming Tutorials
@therightpremiums like minecraft ?? xD
pietteke1 1 month ago in playlist Java Programming Tutorials
@pietteke1 So you think minecraft is a simple game?
therightpremiums 1 month ago
@therightpremiums Isn't that the point of java? :D
pesukarhu683 1 month ago
ive been learning c++ for a while now. coming back to java everything is easy now! i think ima stick with java.
kidharris55 2 months ago
@kidharris55 oh no! that doesn't make me feel good lol. I first learned python (which is easy and makes sense to me), now learning Java (second time through these tuts, dont like how I have to declare all the variables where in python it automatically did it but I assume Java is more complex because it is more powerful, no?), next I was going to learn C++... oh well, guess I'm going in the right order then :p
SpeakerFrequer 2 months ago
@SpeakerFrequer lol python has a different syntax to c++ and Java :P That's why @kidharris55 found Java a little bit easier to learn.
VideoGamerHD 2 months ago in playlist Java Programming Tutorials
Bucky for the President !!! \0/
tshayansr 2 months ago
"5.28 my favorite number" LOLing for and 5.28 mins so fari
lub094 2 months ago
haha i love how you say, don't believe me? nah dude i have no idea what ur saying but i still dont believe you :p
jdog90000 2 months ago
sorry about my last coment :(
ihavetoshutthewindow 2 months ago
Hello Bucky, I'm getting the hang of it. Would you mind posting simple "assignments" as a follow-up? Of course, include an answer somewhere....
PhilmPhun 2 months ago
Your favourite number is 20
ronami101 2 months ago
@ronami101 Mine is 2 it gose into all even numbers and even numbers are my favorite type of videos
Lijrobert 2 months ago
Nice tutorial!
kimorsa 2 months ago
This has been flagged as spam show
Oh hey! Have you tried the British Box Breakout (search on google)? Ive heard some great things about it and my friend made plenty of pips.
istiak4 2 months ago
dude... IM 11 YEARS OLD AND IM IN FITH GRADE!!! no joke! im getting a head start in java!!!!! Thumbs up if you think programming is easy!
ihavetoshutthewindow 2 months ago in playlist Java Programming Tutorials
This has been flagged as spam show
@ihavetoshutthewindow cool story bro, but ehm... this is the very very very basic so gtfo
JoramDA 2 months ago
@ihavetoshutthewindow lul no
iwazerein07 2 months ago
@ihavetoshutthewindow Dude, this is the second thing you are making, it will get harder of course.
xInstinctful 2 months ago in playlist Java Programming Tutorials
@ihavetoshutthewindow You're an idiot, it gets really hard and complex later. Stop being proud of your age, you're not special or unique.
JakeJohnRogers 2 months ago
This has been flagged as spam show
@ihavetoshutthewindow glad you think it is easy...
MyEdVid 2 months ago in playlist More videos from thenewboston
@ihavetoshutthewindow wow u bad
MrHourlyCookie 2 months ago in playlist Java Programming Tutorials
...
bobbycat123454 2 months ago in playlist Java Programming Tutorials
Is your birthday the 28th of May?
CallyB97 2 months ago in playlist Java Programming Tutorials
thumbs up if your going to make a mod with this
KryptonicxXxX 2 months ago
thumbs up if your here for minecraft :D
testforhq 3 months ago in playlist Java Programming Tutorials
I hear you talk more then i hear anyone else xD
sorontorox 3 months ago
You are more helpful than my lecturer, thank you
millsy1804 3 months ago
I WANT TUNA MOVIES
joonbaa 3 months ago
Bucky,... you're HOT!
Fayzh 3 months ago
bucky
TheDemonStr 3 months ago
haha, i'm in 8th grade math and i'm working with variables :x
JakeFerrante 3 months ago in playlist Java Programming Tutorials
@JakeFerrante
lol im in 5th grade and is doing the same thing XD
The1717awesome 3 months ago
dude i luv alot right now. plz keep making P.S iaint gay
joeberro1 3 months ago
This has been flagged as spam show
Don't you hate it when the two top comments are saying the exact same thing? -.-
seltblade 3 months ago
1:43 "Bluh bluh bluh" LMFAO
Dercommandingofficer 3 months ago
i have copied everything there but when i o to run it it said selection does not contain a main type please help :)
1234chazman 3 months ago
Thank you Bucky! Someone give this guy a Nobel prize
JLuso4444 3 months ago
I can't watch like 50+ tuts in one day... I love you Bucky. You're amazing.
Pokihee 3 months ago
@TheModernKillcam I'm not learning this for minecraft, but I will use it there :P and what I am learning this for is a game to make and run on minecraft's engine.... minecraft FTW
MineCrafterBrad 3 months ago
This has been flagged as spam show
Don't you hate it when the two top comments are saying the exact same thing? -.-
LikeToLMFAO 3 months ago in playlist Java Programming Tutorials
First I must learn the basics, then advanced, and finally the game development tutorials so I can make my own Minecraft. And so it begins.
iAmAlascar 3 months ago in playlist Java Programming Tutorials
My favourite number is 5.28 as well xD
WhiteSleevedStu 3 months ago
Minecraft, and Android. yes.
12me91 3 months ago
This has been flagged as spam show
i my have figgerd it out :)
PSYCHOSONOFGOD35G 3 months ago
This has been flagged as spam show
whats it mean when it says editor dose not have a main type plzzzzzzz help!!!!!!!!!
PSYCHOSONOFGOD35G 3 months ago in playlist More videos from thenewboston
@105JellE , PrintLn tells the computer "after I write this, whatever else I write goes on a new line.
DKenobi1 3 months ago
@DKenobi1
yes that's right :)
ratchet900able1 3 months ago
What is the difference between print and println?
105JellE 3 months ago
@105JellE he says it in the video cmon pay attention if you're actually willing to learn this.
Kronikwookie 3 months ago in playlist More videos from thenewboston
@105JellE
the difference is that print makes the words in the same line but println makes everything you print next will be in a new line
ratchet900able1 3 months ago
it says:
"The value of the local variable tuna is not used"
Why?
RockAmRing2oo9 3 months ago in playlist Java Programming Tutorials
Thumbs up if your going to make an app with java
135792468Baseball 3 months ago 92
@135792468Baseball Aha, I am going to "attempt to make" an app with Java.
gam3r3602 2 months ago
How do you add spaces between the printed words?
TheBmxkid24 3 months ago in playlist Bucky's Java Tutorial
click4brichcom
marazali1905 3 months ago in playlist Java Programming Tutorials
Are Java series complete?
TheThakos14 3 months ago
does anyone know why this doesnt work?
final double g = 16.0
double t = 35.5
System.out.println(1 / 2 * (g * t * t));
System.out.println("meters per second squared");
any help would be appreciated
hobosmurf 3 months ago
@hobosmurf
there is ur mistake
final double g = 16.0;
double t = 35.5;
then runned i get:
run:
0.0
meters per second squared
tomux7 3 months ago
@hobosmurf I strongly recommend you not to do any operation when your printing something, it's way better to do it before, saving the result and then display it on the screen
renzozs 3 months ago
@renzozs still doesnt work for some reason but thanks a lot, i didn't know that
hobosmurf 3 months ago
@hobosmurf hmm weird try this code:
final double g = 16.0;
double t = 35.5;
double res = ((g * t * t) / 2);
System.out.println(res + " meters per second squared");
renzozs 3 months ago
Comment removed
TMcDonagh97 3 months ago
lol mod not mpb
a1missle 3 months ago
im mqking a minecraft mpd
a1missle 3 months ago
@a1missle You have fun with that
YOUxFUCKxCATS 3 months ago in playlist Java Programming Tutorials
@YOUxFUCKxCATS thx i will
a1missle 3 months ago
Anyone else learning this to create an RSPS?
OhaiImTeddy 3 months ago
How can I compute the are of a triangle
ItsMeJayelle 3 months ago
@ItsMeJayelle 1/2 base times height
Twasik4 3 months ago
You’re an amazing teacher!!!
You’re the reason I’m passing my Computer Science class!
TheFictiveUNIVERSE 4 months ago 7
this is better than human teacher
shreymantu 4 months ago
@shreymantu he IS human
CloudDecim 4 months ago in playlist Java Programming Tutorials 9
@CloudDecim i meant human teacher in REAL time
shreymantu 4 months ago