Added: 5 years ago
From: aphonik
Views: 69,236
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (62)

Sign In or Sign Up now to post a comment!
  • Please use a real editor. Newcomers who see this video will think that Notepad is acceptable as a programmer's editor and never find personal fulfillment.

  • You assigned myFloat twice?

    Even though they're two data types wouldn't it cause confusing if you called them for a argument?

  • Nice vid, but bump up the sound on ur mic plz :D

  • and what is char used for im soooo lost...i should just watch em all b4 asking questions

  • wat is boolean used for like idk wat is true or false like watever u mean omg its so hard to say ummm welll....fail;

  • bite myvariable lol =]

  • thank you for the videos! keep it up!

  • Thank you very much for your tutorials! I learned a whole lot today!

  • You do a good job at getting into detail with each piece of code which is very helpful. You should pick back up on the series even though it's been a couple years. Great tutorials, thumbs up.

  • Dude, you're so sweet ;) "Float can hold smaller numbers then double. Double can hold extremely big numbers, float can hold small numbers - OH - not smaller than - it still hold quite large numbers but not as large as double". Haha, love your videos!!

  • You should be a Pilot - You have just the voice!

  • definitly agree. it wouldn't compile if he declares myFloat twice, should have made his double variable called myDouble.

    other than that, simple clean tutorial, great for beginners!

  • Thanks and great..  But you should probaby call the double variable "myDouble" instead of repeating "myFloat"

  • Awesome work. Clear and basic, thanks for this :)

  • Aweet man this rocks!

  • Tyvm! You have so many, and I need to learn java! Sweet vid, 5 stars!

    also, earrape 4:19 XD

  • gracias gran aporte.

  • Thanks! this really helped me out! and btw, i love your accent! :D

  • if you run this what is the out put?

  • Nothing, but I think it would return an error because he used the name "myFloat" twice(as a float and a double) I'm not sure if that's aloud in Java. I don't know that much about it(hence watching this tutorial :3). It works in some languages and doesn't in some. But overall great tut.

  • Thank you, aphonik!!! Yes...the 8 primative data types, as seen in this video, store values DIRECTLY into memory. A reference variable, such as String stores a reference to that variable. See D.S. Malik 5th ed, Java Programming, page 120. There's even a picture.

  • your videos are awesome yar

    can you suggest me a video tutorial showing

    inputs during runtime please .

  • very good but that My float typed in twice was a bit confusing, btw you did a preety good job and ill keep on your series to the end :)

  • Comment removed

  • byte -128 to + 127

    short -32,768 to +32,767

    int  -2,147,483,648 to +2,147,483,648

    long -9,223,372,036,854,775,808 to +9,223,372,036,854,775,808

  • HAHAHA byte myVariable!!!

    thanks for the vid!

  • lmao i didnt see that at first

  • int can store with in -65000 to 65 000.

  • Your copying michaels javas vtm.

  • Thanks, this finally cleared up my confusion.

  • thanks ! this is really useful

  • i'm pretty sure he meant to say

    "double myDouble = 10.746;"

    He said he was kind of nervous because he only had 10 minutes, and it's pretty nervous in general just to teach whoever you're going to.

    Good work though, I hope you put a video tutorial on input/output command lines(no JOptionPanes/Dialog Boxes)- I really really need help on those.

  • you left two myFloat variables heheh any way your tutorials are way more explanatory than my school professor =S good job!

  • Anyone get this error?

    found : double

    required: float  float myFloat = 2.25; ^

    1 error

    It seems we can get around this by declaring a float as: float myFloat = 2.25f;

    Although this seems silly to have to do! am i missing something?

  • i dunno but i am apparently missing it to because i have the same error....i dunno why but dude any one help? whats up? lol

  • yeah it should say...

    double myDouble = 10.746;

    you probably got an error due to the duplicate myFloat entries.

    no worries, though! ;)

  • Very good tutorial once again.

  • Yo Thx alot

  • Great tutorial.

  • Man ur scripts are so nice i do you do it?? mine don't go in the same shape as yours help me!!

  • good staff would mind speak up a bit your voice is too low bro.

  • is it possible to hack other computers with java? i dont want to hack people i just want to protect myself

  • at 4:19 you would have better kept the microphone a little further away from your mouth.

  • i have learned more in 20 min with this than 3 weeks with books thanks.

  • University Professors should come here to observe how it should be done. Shame on them.

    Please give us a database connectivity tutorial in the same style. Unless you have to learn it yourself first in which case I'll glady wait.

  • this tutorials are really helping me

  • nice, would be good with some syntax highlighting

    and i dont think the complier thinks 'ab' is a string. Its only ever a string with double quotation marks as you pointed out early.

  • When i compile the code in the video i keep getting the following error.

    Variables.java:19: possible loss of precision

    found : double

    required : float float myFloat = 2.25; ^

    1 error

    i cant see anything wrong with the code it is as follows;

    class Variables { public static void main(String[] args) { float myFloat = 2.25; }

    }

  • Barrrry, I believe that Float cannot hold a number with precision (decimal places). You should use double...or if you need to manipulate rounding and precision in further detail, use BigDecimal.

  • I have found the answer to my problem; Firstly Floats DO hold decimal numbers, secondly all float values must have an 'F' at the end for example; myFloat = 2.25F;

    I hope that helps anyone else who has the same problem.

  • nice upload thanks man am ry to learn java ur vid came i handy

  • There is no difference in those two statements, both the variables hold a value of 50. Only the data type differs. Bytes can hold values from -128 to 127. Int's can hold numbers from -2,147,483,648 to 2,147,483,647. So if I wanted to hold a value of 1 billion (1,000,000,000) I wouldn't be able to store that in an byte. I would however be able to store it in an int.

    =]

  • So, if I want to store 100, it is recommendable to use byte instead of int? Or Short for 500? Thus we can save space on the memory? Is that right?

  • That is correct, you will save memory space. However, just make sure you don't store a value thats higher than the maximum the data type can hold - or some strange stuff will happen =]

  • What is the diference between:

    byte myByte = 50

    int myInt = 50

    ?

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more