Java Programming
ฝัง
- เผยแพร่เมื่อ 11 ก.ย. 2024
- MY UDEMY COURSES ARE 87.5% OFF TIL December 19th ($9.99) ONE IS FREE
➡️ Python Data Science Series for $9.99 : Highest Rated & Largest Python Udemy Course + 56 Hrs + 200 Videos + Data Science bit.ly/Master_...
➡️ C++ Programming Bootcamp Series for $9.99 : Over 23 Hrs + 53 Videos + Quizzes + Graded Assignments + New Videos Every Month bit.ly/C_Cours...
➡️ FREE 15 hour Golang Course!!! : bit.ly/go-tuto...
Cheat Sheet is Here : goo.gl/OPMjte
Subscribe to Me: bit.ly/2FWQZTx
Slower Java Tutorial : goo.gl/UHdlyP
How to Install Java & Eclipse : goo.gl/vEEEJE
Best Java Book : amzn.to/2l27h2h
In this Java programming Tutorial I'll teach you all of the core knowledge needed to write Java code in 30 minutes. This is the most popular request from everyone.
I specifically cover the following topics: primitive data types, comments, class, import, Scanner, final, Strings, static, private, protected, public, constructors, math, hasNextLine, nextLine, getters, setters, method overloading, Random, casting, toString, conversion from Strings to primitives, converting from primitives to Strings, if, else, else if, print, println, printf, logical operators, comparison operators, ternary operator, switch, for, while, break, continue, do while, polymorphism, arrays, for each, multidimensional arrays and more.
Watch More Learn in One Videos
►► Java - • Java Tutorial
►► C++ - • C++ Programming
►► Python - • Python Programming
►► MySQL - • MySQL Tutorial
►► PHP - • PHP Programming
►► Kotlin - • Kotlin Tutorial
►► C# - • C# Tutorial
►► JavaScript - • JavaScript Tutorial
Like the channel? Consider becoming a Patreon! Check it out here:
►► / derekbanas
Learn in One Videos for Every Programming Language
Subscribe to Bookmark them: bit.ly/2FWQZTx
C++ : th-cam.com/video/Rub-JsjMhWY/w-d-xo.html
Python : th-cam.com/video/N4mEzFDjqtA/w-d-xo.html
Java : th-cam.com/video/n-xAqcBCws4/w-d-xo.html
PHP : th-cam.com/video/7TF00hJI78Y/w-d-xo.html
MySQL : th-cam.com/video/yPu6qV5byu4/w-d-xo.html
JavaScript : th-cam.com/video/fju9ii8YsGs/w-d-xo.html
C# : th-cam.com/video/lisiwUZJXqQ/w-d-xo.html
HTML5 : th-cam.com/video/kDyJN7qQETA/w-d-xo.html
CSS3 : th-cam.com/video/CUxH_rWSI1k/w-d-xo.html
JQuery : th-cam.com/video/BWXggB-T1jQ/w-d-xo.html
TypeScript : th-cam.com/video/-PR_XqW9JJU/w-d-xo.html
ECMAScript : th-cam.com/video/Jakoi0G8lBg/w-d-xo.html
Swift : th-cam.com/video/dKaojOZ-az8/w-d-xo.html
R : th-cam.com/video/s3FozVfd7q4/w-d-xo.html
Haskell : th-cam.com/video/02_H3LjqMr8/w-d-xo.html
Handlebars : th-cam.com/video/4HuAnM6b2d8/w-d-xo.html
Bootstrap : th-cam.com/video/gqOEoUR5RHg/w-d-xo.html
Rust : th-cam.com/video/U1EFgCNLDB8/w-d-xo.html
Matlab : th-cam.com/video/NSSTkkKRabI/w-d-xo.html
Arduino : th-cam.com/video/QO_Jlz1qpDw/w-d-xo.html
Crystal : th-cam.com/video/DxFP-Wjqtsc/w-d-xo.html
Emacs : th-cam.com/video/Iagbv974GlQ/w-d-xo.html
Clojure : th-cam.com/video/ciGyHkDuPAE/w-d-xo.html
Shell : th-cam.com/video/hwrnmQumtPw/w-d-xo.html
Perl : th-cam.com/video/WEghIXs8F6c/w-d-xo.html
Perl6 : th-cam.com/video/l0zPwhgWTgM/w-d-xo.html
Elixir : th-cam.com/video/pBNOavRoNL0/w-d-xo.html
D : th-cam.com/video/rwZFTnf9bDU/w-d-xo.html
Fortran : th-cam.com/video/__2UgFNYgf8/w-d-xo.html
LaTeX : th-cam.com/video/VhmkLrOjLsw/w-d-xo.html
F# : th-cam.com/video/c7eNDJN758U/w-d-xo.html
Kotlin : th-cam.com/video/H_oGi8uuDpA/w-d-xo.html
Erlang : th-cam.com/video/IEhwc2q1zG4/w-d-xo.html
Groovy : th-cam.com/video/B98jc8hdu9g/w-d-xo.html
Scala : th-cam.com/video/DzFt0YkZo8M/w-d-xo.html
Lua : th-cam.com/video/iMacxZQMPXs/w-d-xo.html
Ruby : th-cam.com/video/Dji9ALCgfpM/w-d-xo.html
Go : th-cam.com/video/CF9S4QZuV30/w-d-xo.html
Objective C : th-cam.com/video/5esQqZIJ83g/w-d-xo.html
Prolog : th-cam.com/video/SykxWpFwMGs/w-d-xo.html
LISP : th-cam.com/video/ymSq4wHrqyU/w-d-xo.html
Express : th-cam.com/video/xDCKcNBFsuI/w-d-xo.html
Jade : th-cam.com/video/l5AXcXAP4r8/w-d-xo.html
Sass : th-cam.com/video/wz3kElLbEHE/w-d-xo.html
Hello Derek, i am a huge fan of yours ans i already seen the video of the java. now i have a question:
i am currently doing a project and i am facing a problem. in my project i am supposed to copy a file and to paste it at another file within my proj. If I leave it as it is, it is already great works and so on. now my question is. is there a way to write a destination folder that is universal for every pc that might have my project? Please help :)
Dang, how could you know all this stuffs?
YOU NEED TO PUT UR CODE SO ITS COPY AND PASTEABLE...NOT WHERE U POSTED IT
watch this java video we created chatbot who talks with you th-cam.com/video/kfPL4bPR-5g/w-d-xo.html
when are you making your start-up? bet no company can dare hire this super-programmer
watch it at 2x speed and learn Java in 15 minutes
+Linus Ackermann That's fast :)
bold
It's so fast. I even couldn't follow, especially for one whose English is not good.
This is not for layman
ha ha
I wrote some notes on it, if you want to use them it's ok
JAVA NOTES:
1. // [comment]
Single line comment.
2. /* [comment] */
Multi line comment.
3. public
This can be imported publically.
4. import [object].*
Imports everything in object.
5. static
Going to be shared by every [object].
6. final
Cannot be changed; common to be defined with all uppercase.
7. double
Integer with numbers that can have decimals.
8. ;
Put after every command.
9. String
Just a string of characters.
10. Private
Can only be changed by a method.
11. int
Can store numbers from 2^-31 to 2^31.
12. fields are attributes
13. boolean
Can have true or false as the value.
14. { }
These are used to start and end a function, class, etc.
15. byte
These can store from -127 - 128.
16. long
Can store numbers from 2^127 to 2^-127.
17. char
Just lets you put in one chracter.
18. double
64-bit number with decimals.
19. float
32-bit number with decimals.
20. protected
Can only be accessed by other code in the package.
21. Scanner
This lets you get user input.
22. new [object constructor]
This will let you create a new object.
23. System.in
This lets you get data from the keyboard.
24. public [class]()
This will be the constructor, you use it to create new objects.
25. super()
This will create the superclass (the class it's inheriting).
26. extends [class]
Makes the object a subclass of [object], [object] must be a superclass.
27. ++
Will increment the amount.
28. --
Will decrement the amount.
29. += [amount]
Increment by [amount]
30. -= [amount]
Decrement by [amount]
31. *= [amount]
Multiply by [amount]
32. /= [amount]
Divide by [amount]
33. System.out.println([text])
Will print something to the output console.
34. +
Can be used for concatenation. (ex. "6" + [var_here])
35. public static void main(String[] args)
This is your main function and your project will start in here.
36. System.out.print([text])
This prints stuff but there is no line break. (/n)
37.
Called a line break; will print a new line.
38. \t
This will print a tab.
39. if ([condition])
This will make it so if [condition] is true then it'll keep going.
40. &&
This means and.
41. !
This means not.
42. ||
This means or.
43. ==
This means equal to.
44. <
This means less than.
45. >
This means greater than.
46. >=
This means greater than or equal to.
47. [inputVarHere].hasNextLine()
This will return if there is a next line in the input.
48. this
Refer to the class that you are in.
49. [caller].next[datatype]()
This will get the [datatype] that you somehow inputted.
50. Create getters and setters
This will create the get methods and set methods for every checked variable.
51. [caller].hasNext[datatype]()
This will return if it has the correct datatype within the input.
52. overloading
If you have different parameters you can call them whatever way you want.
53. parameters
These are the inputs of your function.
54. ([datatype])[variable]
This will convert [variable] into [datatype]. Also known as casting.
55. Math.random()
Generate an extremely percise string of numbers between 0 and 1.
56. Primitives
Just the basic data types which are not objects.
57. [x].toString()
Will convert [x] into a string.
58. [number].parse[numbertype]([string])
This will parse [number] into the [numbertype] with [string].
59. ^
Return true if there is one true and one false.
60. !=
Not equal too. (NEQ)
61. ([condition]) ? [amount] : [var]
This will be like a shortcut way to an if statement.
62. switch([variable])
This will do stuff with specific cases. (e.g. switch(hi){ case 2: (do stuff)})
63. case [value]:
This will do stuff if the case is the case.
64. break
Put that when you want to leave the loop/switch; should be at end of case.
65. default [value]:
This will do stuff if none of the cases in the switch statement was made.
66. for ([number]; [condition]; [operation])
This will start at [number] and then do [operation] until [condition] is met.
67. continue
This will just go back to the enclosing loop before reaching other code.
68. while ([condition])
This will basically do something while [condition] is true.
69. void
This means no return type.
70. return
This will return something when you call it to where it was called from .
71. do { } while ([condition])
Guarantees it will execute once even if [condition] isn't met.
72. printf("%[type] stuff here bah bla", [variable here])
This will let you use [variable here] with %s being where.
73. System.out.printf([text])
Another way to print? // didn't quite get but ok then
74. [type] [returntype] [name]([parameters]) {
This is a way to create a method.
75. [type][[indexes]]
This will create an array with [indexes] amount of indexes; default infinite.
76. int[] something = new int[20];
This will just make an array of ints with 20 ints in it.
77. for ([object] [nameOfObject] : [arrayOfObject]) {
This will iterate through all of the arrayOfObject with object in use incrementing by 1 until done.
78. [object][[1]][[2]][[3]] [name] = {[value] [value] [value]
[value] [value] [value]}
[1] is how many down in array, [2] how many accross in array, [3] how many groups
79. .length
This will get how long something is, text, amount of indexes in array, etc.
80. Arrays.copy0f([array], indexes);
This will copy the array and how many indexes into another array.
81. Arrays.toString([array])
Convert the whole array into one huge string.
82. Arrays.binarySearch([array], [object])
This will search for [object] in [array].
Might not be very consise but it should do the trick.
+TheUltimateRPG10 Thank you for taking the time to make such an awesome list :D
Derek Banas No problem, I like to take notes while I watch videos anyway.
+TheUltimateRPG10 15. byte is -128 to 127
+TheUltimateRPG10 16 is also wrong.
mob luse ok i'll fix
This video is good for people who already know how to program and want to learn java without being taught what variable types are all over again
Thank you :) That was the goal
Yeah, this helped me but I already know multiple coding languages
FunOrange sunny day real estate
I am starting a new series for the absolute Java beginner!
Derek Banas I really like your videos. They can be a great for revisions or getting into new programming languages of a paradigm u already are familiar with. We are so blessed to have u (:
PS:I wonder so many peeps might think they became a SE in 30 mins. :P
This is an excellent Java primer for anybody who is already experienced in programming.
To anybody wholly new to programming: THIS TUTORIAL IS NOT FOR YOU. Most of this code is just nonsense and contains bad practices, but it is a useful showcase of the core language structure and features, if you are already experienced. So don't be disheartened. Go buy a programming book, switch your internet off, and start playing around.
Thanks, do you have any book recommendations for learning programming? :D
@@Bremeep I started with an edition of C++ Programming In Easy Steps by Mike McGrath many years ago. I would recommend that series if you can find a more recent edition.
But persistence is the key really, you need to buy a book and be prepared to sit down with it and bash your head against the desk and feel like you're not making progress and continue anyway.
But even though it can feel so crap at times, when you see your program running and working as you expect, it makes it all worth it.
I did this for two months......that was half a year ago and now I'm back to being clueless ._.
Books are boring. Take a Udemy course.
@@justsomeguy8385 Then you should read better books.
I'm watching this to procrastinate studying for my C++ exam tomorrow, I have no idea what is wrong with me.
Any time I find it hard to focus i go and do something physical for a bit and then try again
Let me try that! Tomorrow after I've written C++ I will come back and learn Java
wtf lmao
Dylan Viranyi lmao
You beat one off?
All the people saying this didn't immediately make them understand Java. That's not the point. It's meant to explain the Java syntax, not teach you how to program. (that's asking a bit much for 30 mins!)
As someone who's been coding for 4ish years I'm still really new, but this makes for amazing exam revision when I want to brush up on syntax for a specific language (I work in C# but use java for a few University papers)
If you want to learn programming in a usable sense, check out code academy for the practical side and Kahn Academy for the Computer Science (both very important).
If you want a job in Computer Science you can even use Udacity to get a highly advanced education in specific fields.
,,
I could't have said it better. I have been taking Java classes since freshman year of college and right now I am actively looking for jobs in junior level programming This video is good for just refreshing your memory of Java, not actually learning it.
I'm learning java right now in school and honestly feel like this video explained WAY better than my textbook. lol
I mostly use php , but I can understand this a little bit . I usually watch stuff like this , quick review, and then go back to the beginner tutorial . and then I'll be like " so that's what it means " rofl. it's easier to learn like that for me
I mostly use C++, and I understand quite a bit of it. I think people are right when they say if you learn one programming language, it's easier to understand/learn another one.
00:10 In: Pumped to learn Java
03:00 In: Currently filling out McDonalds job application.
+Travis Feel free to ask questions. I'm happy to help.
hahaha I feel you
I really hope you respond, but I just don't understand why I should use a constructor? Why does "main(String[] args)" have the [] and the args? What do they do? Why should some stuff be in brackets while others shouldn't?
*In Spongebob Narrator Voice*
"Two months later."
Tyler Gutowski
A constructor in java is a special type of method that is used to initialize the object.
With multiple constructors (overloading) you can make a new object of de class with different arguments.
Been here about a year ago, excited to learn Java for android development.
I remember seeing this tutorial as something incomprehensible.
I left the programming idea after two days.
Now though after the first semester as a CS student and with solid C++ background I find this tutorial very substantial, it has all I need to start working in java and implement the stuff that I already know in Cpp.
Funny how the perspective can change drastically in a matter of months.
Thanks for sharing it with us Derek.
Thank you :) It is nice to hear that the video has been helpful
me to man, i watched this video at the beginning of my apcsa class and i was so confused. 5 months in, this is extremely helpful and not frustrating at all LOL Thanks Derek
I'm learning Java atm(have a few months experience of writing in python).
Well, it was easy for me till classes... until I learned classes, which I didn't understand completely, so I came back here and woah, this video helped me to understand them more firm.
Gonna check this video a few times more while reading head java first, it has a good tempo and it is good for reviewing what you already read once.
once you find yourself comfortable with java, i recommend you to learn Groovy
so the 1st step should be learning c++ as a fully beginner ?
I actually really enjoyed this. It was probably too fast for someone who has never seen the language before but I already have a grasp of the fundamentals of Java so this was very refreshing to watch
Agreed, there are a lot of tutorials (including the ones by Derek Banas) that are really slow. This is a good refresher every once in a while when a couple concepts that I don't use daily slip my mind.
Correct title needed
"Java Programmming : Level 45 needed to proceed"
SoloLearn is your friend. Btw, that's an android app (got no idea if it's on Apples App Store). SoloLearn is pretty great for starters in code tbh. I'm personally using it and it's like the social media platform for programmers :)
Exactly what I was going to comment :)
I didn't knew anything about Java instead of the brackets ( { etc ). I ended the video with more knowledge about Java. I didn't learned it, but got more knowledge.
+SpaceWeed Almost all programming languages uses brackets.
Swapnil Jain lol seriously he is so fast , but he has to tho it's only 30 minutes!
"Arrays, they're basically boxes" ~ Derek Banas 2014
Wes Lowe for HTML users, Arrays can be understood as where "int taco[2][2]; taco[0][0]" would be the first table row and first table data.
Richard Bernard Yeah, I know. I just wanted to point out a quote that I thought was funny :)
+FOXmcloud021 Original It's confusing because I understand hardware more than software and an array in hardware is where a bunch of drives act as one drive and that's not the same for software lol
+FOXmcloud021 Original LMfao
like how you speak louder when explaining very important info in an ever world of increasing distractions and shorter attention span.
Thank you :) I do that on purpose
after 10 min I started reading the comments :D
same
yeah me too
+Ardit Avdolli ..I got to 5 minutes...then scrolled down and saw this lol
+Ardit Avdolli Hahaha yup same here
+Ardit Avdolli me toooooooooooooo
Guys this video is so helpful if you want to review java syntax , it is NOT for absolute beginners !!
Thank you :) Yes some programming experience is required
I find these useful when coming from a different language as well.
This is useful for assessing and comparing ability of programming languages.
Well, I'm complete a§§ when it comes to programming cause I just started learning but for some reason I understood half of what he was doing. But I'd like to ask a question:
What exactly does Void do? Cause everyone's using the Void "command" but I don't know when or how to use it, nor do I know what it actually does xD Would be grateful if you could help me out ;) but nice video! a bit fast but still very well explained :D
[JTJ] Spirit void just means that a function does not return anything. For example, around 28:00, you can see an example of a function that doesn't return anything
I'm kind of an advanced beginner in Java and find this video very helpful to review the basics of Java. For some of the beginners complaining, first of all, the title doesn't say "Java Programming for beginners" so I don't know why you guys are so upset and expecting to learn everything in detail on a 30-minute video anyway. If you are absolute beginner, there's a more in-depth version in the description.
Thank you for the compliment and the defense :)
Petersonic,,there no such thing as an 'advanced beginner'
Theres really three lvl,s,,,Beginner,Intermediate and advanced and when you pass these three lvl's you start going into the 'Genius LVL' but im gust playing :P
I agree 100%! If a person could learn Java from scratch in 30 minutes, there would be a lot more java developers in the world! I've been using Java off and on for the past three years, and I find this video to be an EXCELLENT REVIEW AND REFRESHER. I come back and watch this video every few months, and I keep the cheat sheet saved to my desktop and refer to it often. This channel has the best programming videos! Thank you Derek Banas for your videos, they are greatly appreciated and extremely helpful! You are a programming Rock Star!
The thumbnail image says "Learn Java in 30 minutes" :p Doesn't say if you will understand it though hehe...
right. I programmed in Java in college, and at a previous job outlined a JAVA course, didn't program in it a lot at last job, but did look at it for fun. It's a good review so I'm not stumped when I right my next JAVA program or get asked a question at an interview that I should already know.
I used to think I was smart. Programming taught me that I'm actually stupid. #RealityCheck
If I can do it anyone can
I used to think I was stupid but programming helped me to realise iam smart
I used to think I was stupid.
u can be stupid and smart at the same time...
I used to think i am stupid, now i know i am
You just taught me the things which my professor took two months to teach, in 34 minutes. You should be the president.
I'm very happy I could help :) I'll pass on the President thing though
The world would probably be a better place if computer scientists was in charge. :P
"we're gonna create a class called Animal"
"..BEAR with me"
hahahahahahahahahahahahaha kill me xD
***** That's funny :)
***** Do all programmers have this lame humour?
Jullix993 you're lame?
...what?
was hoping the video would live up to its title xD , should change it to "learn ABOUT Java"
Rex i don't mean to be mean but...you sound like your bragging when you say you have been coding since you were 11.
I'm ten. I didn't understand anything. A string is a string of characters? What's that ?
D Cindy maybe start with an easier language, like html.
A 'String' is actually an object in Java. It means that every single character in a 'String' is stored separately in an array or a list if you will, and can be accessed or mutated through object methods.
Very complicated but i think I got it, so a dog = a animal
You got it :)
Nah animal = dog fam
Funny comment, my man.
Nah dog is a subclass of class animal
Nicely done
This. Video. is. GREAT. Thank you very much!
A week ago our Programming teacher just gave us 20 exercises to finish within three hours and none of us have a lick of experience on Java, //nobody finished all the exercises so we'll have to come back tomorrow
and this..
You, sir, deserve a big. fat. trophy. but I'm not sure what you'd use a trophy for, so here's a big bag of cookies. :D
That's funny :) Thank you. I'm glad I could help
At first I thought I was too stupid for this stuff, but then I realized, that 1. I'm a bit drunk, 2. It's 3 am.
I installed the software, did this in semi-early evening time and I've been sober for months. Screw it, I still couldn't follow. This was way too complicated and fast paced for me. I actually have very poor history in coding: I made a webpage with a few lines of text and programmed in gradeschool. I programmed with that Lego robot and I programmed my picaxe to play "The Jaws"-theme with a press of a button. I need to learn some of those basics at first...
+Kehveli “Knifebox” Lurjus He does a very good java breakdown in this playlist, starting at VERY simple concepts, and evolving into a lot of complex stuff. Id' recommend going thru it, then revisiting this tutorial if you get snagged or need a rundown on Java syntax. It's a tutorial to be used for refreshing more than learning from the first minute on. Otherwise you WILL get buried FAST.
Tyler Small yeah. I actually tried to write the code along with this guy, I propably made a mistake somewhere... That's why it complained. And that's why I gave up.
He writes very quickly, and it's very tough to code along with him at his speed.
Tyler Small I noticed that the hard way.
You're really good at giving a 4 year education in 1 hour (or 30 minutes if video is played on 2x speed.) Thumbs up for sure. Thanks very much for your efforts.
Thank you :) I try to do my best
what school did you go to?
"I doubt new people hung around for this" Lmao
Thank you for hanging around :)
I'm new to java. Still hanging around.
Tbh the first time I watched this I got half way, 3 days after watching the mini tutorials I finally came back to this and I heard him say that and I was like Daym hes good.
my little brain explode
myfreetime123 i had no clue wtf was going on, so much numbers ;>
myfreetime123
lool
myfreetime123 I want to create games so badly, but i'm to stupid to understand.
Floppy mcdoogan *too stupid to understand
Paul Mattaway Seeeee
I have my Java exam tomorrow, this pretty much summed up our entire course, great video, I needed that recap!
Thank you :) Best of luck on your exam!
So how is working at Burger king? lol Jokes aside did you pass?
@@dobby240 I work at burger king, nothing wrong with that ;)
I needed to review my java for an interview, and watched this at 1.75x speed; BEST REVIEW EVER!
are you successful in that interviwe?
@@attantianirudh3784 were* and interview*.
This is great for people who already know some of the language. I'm sure that other people would be lost only 5 minutes in...
Great video!
Thank you :) Yes it isn't meant for beginners to programming
banana foam Some beginners are fast learners and *code language* are very easy.
Yup, I'm lost 😅
I think you meant 30 sec...
I was getting lost along the way but i can keep up sometimes. Then tada! I finish the video without understanding the three multidimensional array, i can only understand two dimen since it was the one i used in university 😂
Thanks Derek ! Format is unbelievable ... language and description very clear ... and you're even sliding in a few subtle jokes ... entertaining. I'm going to watch it 10 to 20 times until I get every single thing.
Thank you for the nice compliment :) I'm glad you liked it
Excellent Video, I'm with Stuart. I would recommend speaking a little bit slower since it's hard to keep up with you. I always pause the video to reverse a bit. It would be super nice if you would make some pauses in your video for the viewer to type since you are super fast. You use copy and paste, as well as autocomplete a lot. Just type and speak a little bit slower, that would help me understand your future videos much better. Thanks a lot.
Did you watched it 20 times? Did you got every single thing?
1.618 is my favorite number 2
***** becuz i wanted to learn java
+FrankJavCee He asked how, not why. xD
+FrankJavCee This isn't real.
+FrankJavCee Phi. while perhaps unoriginal, originality isn't a requisite for liking something. I get all caught up with e, so I am not much different.
1.618 will actually be 1 if you cast it to a long or an int! Unless you use the Math.round() function.
i.e.
import java.util.Scanner;
public class MakeDoubleLong {
public static void main(String[] args) {
int faveNum = (int) 1.618;
long longFaveNum = (long) 1.618;
int roundedFaveNum = (int) Math.round(1.618);
long roundedLongFaveNum = (long) Math.round(1.618);
System.out.print(faveNum + "
");
System.out.print(longFaveNum + "
");
System.out.print(roundedFaveNum + "
");
System.out.print(roundedLongFaveNum + "
");
}
}
And running at the console:
> javac MakeDoubleLong.java && java MakeDoubleLong
1
1
2
2
04:53 - "src" is just a folder, not a java package. You are working inside "default package" and this is the range of protected attribute.
I really like how all the basics were quickly ran through with great edits.
This is like the first 3 or 4 chapters of lots of books in 30 minutes!
I hope you do more advanced videos as I want to learn what one does with all this information after one learns it.
Like most newbs I am most interested in seeing what once can do with java once all this stuff is learned.
I like to get an overview of EVRYTHING before I know HOW to do things and What I am doing it for.
I will be sure to see just how many Java videos you have done so far and look forward to any more that you do.
The more of an overview I can take in, the better it will be for me to get started and know what to do with the info once I am more apt with it.
THANKS!
MindMeme Thank you :) I have done hundreds of Java tutorials at this point. Most all of the basics are covered plus, object oriented design, design patterns, refactoring, UML, algorithms, etc. Check out my channel playlists. I think they will help.
I just found them and I'm on my way going through each one! I also bought "Thinking in Java 4th Edition as a work book. I think your videos will prime me for everything I need to know! Thanks! Content producers ought to know their hard work is well appreciated!
MindMeme You're very welcome :) Try out as many books and videos from as many sources as possible. If think in Java doesn't work for you there are many other great books.
Derek Banas I'm always open to hear suggestions and recommendations from those who are already very advanced. that book came well recommended, but when someone has been down the path and can tell about books that really helped them launch forward, It's very valuable information to get form experienced professionals. Thanks!
MindMeme You can basically do anything you see on a computer! I have made games and software UI with Java, you could also make batch conversion software, file type conversion software, computer control software, server connection software, you could make a skype-like program, and applets for websites. Java is great! The one most important thing to learn in Java is the core functionality, which is covered (at a quick pace) in this video. Get cozy with functions and classes, which are the most difficult to grasp. For games you should get familiar with the Applet library, the KeyListener library, and the JFrame library.
Not only do you speak in the clearest form, but you teach in.a way that makes it all stick in my mind easily.
Thank you very much 😁
Got to about 7:30 before i started staring at the wall and day dreaming about my cat =D
That's funny :)
I got to 6:55 *thumbs up*
same
I got to 0:30 before I started watching porn.
I got to 5:13 hahaha
go to 0.50x speed and learn java in 1 hour
Someone pls tell me why are some words appearing pink in this coding and do they have some special meaning in computer and what do we call them in computer
Thanks for the upload, I’m in my 2nd semester of CS and was questioning if I really know the core programming knowledge. After watching I realized, I know how to do everything in this video and I have more confidence now. Thanks
10 mins in, and this makes almost no sense
+Ryan Delgado Thank goodness I took C++ last semester. Some, but not all, of this lecture makes sense. I never taken OOP C++, but I think Java shouldn't be too hard. I'm going to take Java and C# in the spring semester along with Calculus 2 & Physics 2 (fluid dynamics). I might be overwhelmed, so I'm somewhat worried because computer programming takes time and patience.
Is anyone is confused then watch thenewboston tutorial and then watch the guy
This is massively similar to C++.
If you want simpler OOP, goto Python.
+Ryan Delgado I love OOP, it just takes a learning curve to get it. Some people NEVER get it, and decide to swear OOP is just confusing and take that to the grave. /shrugs
I code in java for a living, and find procedural languages primitive and too simple, and I miss the power of encapsulation.
+Deltaexio Python is great for simple scripting type things. I get sick to my stomache thinking of making full complex applications in Python though. I know people do it, but I think these people are sadistic.
Object Oriented Scripting in python is very powerful and flexible though, so I do recommend learning it.
Learned a bit of Pascal and C++ and wanted to get into Java. I understood everything, thank you for saving me the time I would have wasted on watching 100 beginer tutorials! :D
SteveMineru You're very welcome :) I'm happy that I could help
Derek Banas :D Could you do a tutorial like this for GUIs? I would really appreciate it! ;)
SteveMineru I cover pretty much every Java swing component with 3 different layouts in this one tutorial Java Video Tutorial 30
I have a bunch of other swing tutorials as well
Derek Banas Thank you :D
this man singlehandedly changed my life for the better. i remember being down in the dumps after failing out of my CS degree back in 2015. thanks to his videos i managed to finish my degree and get an amazing job
Thank you for taking the time to write such a nice message. It means a great deal to me. I wish you all the best in life :)
You explain things wayyy to fast at the wrong times. You're a good teacher and all, just wish this was a bit slow-paced. In the beginning it was good, but when things got complicated, you sped up when instead you should of slowed down.
I was wondering what and why I was doing some things while following this tutorial towards the end.
Sammy Samkough Sorry about the speed. I'm constantly working to move quickly while maximizing comprehension
It's totally understandable, I just wanted to help you with your future videos.
Thanks for all the help man, you're a great programmer!
Sammy Samkough Thank you :) I'm always interested in getting input from everyone.
True that.
you can this the repeat button if you missed anything, amazing yeah?
I want to cry.
wanacry
I have java homework due in 2 days... I only have myself to blame.
can I get an update on how you feel about java after one year? Still crying or no?
@@Roorb that's so weird, i only just found out what wannacry is by clicking a video in my next tab and i see this, :O
@@philliey i started with arduino then went to python. Java is the only one that made me want to cry! lol
No bullshit - just explaining Java by example, I just love this video. Thank you!
+Toby Johansson Thank you for the compliment :)
Settings > Speed > Change to 0.75 = Good to Go
LMAO, you juss made ma day...
Shift +
BELOW IS THE JAVA AND MYSQL PROJECT
th-cam.com/video/cIIpVD5x_ig/w-d-xo.html&feature=share
Note: if you think you are a master at Java after watching this video (if you're completely new to programming), you have no idea how wrong you are. Anyhow props to Derek for uploading this
+Tiger's Wood I agree that this covers the syntax of the language only. Many months spent studying algorithms, object oriented design and pure experimentation is definitely required for mastery
So basically C# is the lovechild of C++ and Java? Nice
Pretty much
Yeah, but it still seems pretty popular in spite of that.
@@DTDdeathmas ..popular in spite of being a lovechild???
He is responsible for the blend: en.wikipedia.org/wiki/Anders_Hejlsberg
I think the best use of this video can be made by someone who has learnt JAVA and wants a revision.
If you are a beginner , this is NOT the video for you.
+12345a I agree. This video is for people that have experience with other languages, or for those who want a quick overview.
+Derek Banas yeah. This is especially great before a JAVA exam.
For those who dont know java (like myself) , I recommend the newboston channel .
I learnt C++ from that guy , and now I will learn JAVA
One day i started hearing about coding, and how there was a demand for coders. I had previously taken a cis101 course, so i decided to enroll in a programming logic course, and then a java syntax course. This video is the java syntax, its a quick run thru of the java syntax. The textbook " how to program in java" will explain how to use the syntax in this video to build a program. It is very helpful to enroll in a college course to have a teacher guide you thru the process of learning how to program. It is a process, you cannot jump to a 30 minute snap shot of the syntax and expect to comprehend. Do not get discouraged, if you are willing to invest the time and effort to understand java syntax, it will eventually begin to sink in. So far I have invested 2 years in computer information science, and it has been very rewarding. Do not pay for a boot camp until you have invested and completed in at least 3-4 college level courses.
lost it after 11:56
same
May I suggest taking a trip down to your local library and checking out a book called, 'Java for Android Development', or Google the title and look for a download version to use in conjunction with the tutorial. That way you should be able to make better sense of both the book and tutorial.
Hope this helps.
Oh, as a side note, I pause the video after a while in order to read the book and absorb the information. It takes me a while to learn new concepts and I haven't even begun to make an attempt at practicing writing the codes on my computer though I know it would help me tremendously if I did. I'm kinda just focusing on the general concepts at the moment with plans on practicing the codes later when I return to review.
Thank you ive been looking for recommendations on good Java books
Rohan K you did better than me by 50 seconds
Can't even understand a single word 😃
try codecademy.com
Don't use codeacademy, it sucks (at least for me). I would end up just blindly copying. I found TH-cam tutorials like these to be the most helpful in learning how to program in Java from scratch. Another good series to check out is "thenewBoston". He, along with Derek have great videos to learn to code in Java.
Ya the new boston is really good
Thought I was the only one!!
Same. Lol. He's not explaining what any of this is for. Lol
im here cos i failed my java module and cant get my diploma
Watched it through as a complete beginner. Didn’t understand much of anything but it’s so fascinating to hear him talk about. It’s so natural for him.
Please ask any questions that you have and I'll help. Anyone can learn this stuff if I did.
You are awesome, Derek! I keep getting fascinated by your tutorials. They are easy to learn, and everything makes sense.
Peter Grimstad Thank you :) I'm very happy that you like them.
Derek Banas You responded so quickly! Do you read all your comments?
Peter Grimstad Yes I read and answer all of them. Always feel free to ask questions.
Derek Banas That is incredible! Don't you get one every minute or so?
Peter Grimstad No it isn't that bad. I check every other hour or so. I normally get about 10 questions.
Found this so so good. For people with a bit of java knowledge who dont need their hand held, this is the fantastic. Best video I've watched on java
Thank you very much :)
He literally finished my entire syllabus for class 12 in 35 mins
I'm a C++ developer with years of experience, and just learned JAVA in one hour with the help of this tutorial, thank you.
I'm happy It helped :)
@@derekbanas Same with this c# (so Java is ezpz) guy, great video that gets to the meat of what I want to hear!
so you basically covered most of the basics to OOP in a little over 30 min...well done.
Thank you :) I did my best
"But I doubt new people hang around for this heh..."
*Sadly walks away*
A very good tutorial on Core Java... but i also expected a brief overview on Threads, Exceptions and File I/O, as i think they also are a part of Core Java.
Thank you :) Sorry for not covering them. I cover them in detail in my big Java tutorial
4:46 Just a little correction.
Protected modifier data can also accessed from sub classes from different packages.
Awesome video. thanks.
If the compiler knows I'm missing a ; on line 32, why can't it just put it there for me?
It is a very great tutorial for someone who already knows a similar programming language. I know a bit of c# and it was cool to see in 30 mins what basic java looks like. But, of course, for total beginners this video might be a bit too fast)))
+spectre42 Thank you :) Yes it wasn't meant for complete beginners.
really usefull for language migrators - not for beginners though
Yes it definitely isn't for beginners
So cool you are answering comments! May I ask some advice for a c++ guy trying to start coding in java?
I know I am four years to late, but I want to say that this tutorial is AMAZING!!
I already have my degree in computer science, and wanted to have a quick review and this tutorial was perfect.
Thank you!!
Thank you for taking the time to tell me you liked it :)
when you got the ap computer science exam in 30 minutes
I find this to be remarkable, I'm fluent in java and this truly is almost everything you need to know. i have been using java for about 3 years and this is amazing! Thank you
MrTy0072 Thank you for all the nice compliments :) I did my best
Derek Banas Damn this is crazy. I've been scrounging the internet for the past 6 months or so, and i'm getting pretty good. Even this had information i have never heard. Super helpful
***** yes i do
MrTy0072 Are you a freelancer?
Crimson Freak Its been a while but, an android developer, not a freelancer
non c background be like --" Hey!!
what you did in last 30 min man" 😑
Just passed my oracle certified associate exam :) I learned so much from your videos so just wanted to say thanks. Your tip, "think like a compiler" really helped when the questions got tough. Once again THANK YOU DEREK !!!
it's really nice video when you know c# or c++ because it's easy to see differences. after watching i know what I need to learn and what is the same.
Thank you :) I'm glad it helped
How to lose all hopes and dreams in 15 minutes?
Promise, I’m like wtf are u even trying to do 😭😂
Looooool
Excellent refresher! I didn't even know Java had a Python-like for loop that can iterate through an array!
Thank you :) I'm glad you liked it
"Python-like" LOL. Python is a child who is wearing his mom's loop - it is not Python's loop and Python doesn't really understand WHY it has a loop... it just wants to play grown-up. ;-)
@@jameswhite1910 toxic
This man deserves the gold play button. Saving my degree in 30 minutes.
Thank you :) I'm happy I could help. I hope to get it this year!!!
beginner. didn't walk away. am going to cry a little in my bed right now.
+Steve Almighty Sorry about that. Here is a Java video that goes at a more reasonable pace th-cam.com/video/TBWX97e1E9g/w-d-xo.html
+Derek Banas oh wow, with your fast pace and clear high knowledge, i didn't think you'd have more beginner-like videos. thank you a lot!
Great vid, thank you!
Only thing I dont get, how come you created a 2nd main method? 28:39 I thought there could be only one.
Keep up the good work :)
New person hung around 14:20 :D
Thank you very much :)
Subbed immediately!
I have to make a Battleship game in java for my APCSA class and I'm lost asf. This video really cleared some doubts for me man, thank you. This is step one.
I'm happy I could help :)
This guy is seriously on fire!!!
BioHacksNet Thank you :)
An awesome no nonsense video about Java!
I'm glad you liked it. Thank you :)
This is a great deed, providing maximum knowledge in one video. I really appreciate your work, videos like this are great contribution to programming universe!!!
Thank you for the nice compliment :)
After spending over a year in school taking an AP course in this... This video finally made complete sense... Now to find out how to perfectly pseudocode before a program and how to use the syntax data base to program anything I can think of :)
Thanks Derek !!!!!
I'm happy to help :) I cover object oriented design here th-cam.com/video/fJW65Wo7IHI/w-d-xo.html and Java / MySQL here th-cam.com/video/mSbFrQfgq7A/w-d-xo.html
men, slow dowm!!!!!!!
+Adan Santillan This guy specifically makes fast videos. That's his thing. I love the speed. I don't have time for those 5+ hour videos that cover the same amount of material.
oh man i love you. hold on, i'm getting all verklempt over here. and you're doing this for free for me. free is just one of those words that ... gets me right here. oh there I go, getting verklempt again... talk amongst yourselves... i'll give you a topic... the holy roman empire, was neither holy, nor roman, nor an empire, DISCUSS!
Verklempt is an awesome word! Thank you and you're very welcome :)
This is a really good Tutorial. Thanks.
Thank you very much :)
I studied Java in my master in CS ~20y ago (and was C/C++ developer& architect)...now i need Java for an HW/SW integration project using Java SDKs/APIs...this was a perfect refresher in ~20min (1.25x speed)....thank you very much!
HAHAHAHAHHAHAHAHHAHHAHAHAHAHAHAH......... and i got hang of... NOTHING
...
This not for you. This is for people who already know to code in some other language and want to learn quickly how things work in Java.
Yeah I agree with you like 90% of this is review for me, already know html and css, a bit of php(would say 90% of the basics but do not remember exactly the foreach loops, looking forward to a PCRE video
Foreach loops are easy. They read though the elements inside an array. That's their main purpose, at least for me.
I have been doing Java for 3 years ... Why am I watching this? :D
I have been studying it for 5 ! My pathetic little head can't seem to wrap around all the concepts there's always something that I don'
t know
Yeah, true. But then again, if i'd want to see some 'more advanced' concepts or something, I probobly would not watch a kind of 'Java for beginners' video :D
because sometimes you just want to be proud of what you know, and hearing it explained again makes you fell accomplished
or that.. lol
Is it weird that I always read him as Derek bananas?
That was my nickname my whole life. I actually kind of like it :)
This is wonderful! I usually get quite bored hearing the basics over and over again, pacing was PERFECT and fast, easy to grasp if you are familiar with the concepts already. Thank you!
Thank you for the nice compliment :)
Amazing video sir, help a lot for self taught beginnres like me.
Thanks a lot .
Thank you :) I'm glad it hellped
What I have learned from this video is that you can neither learn nor teach Java in 34 minutes.
Thats true.
making a similar video that covers the entire Java GUI programming will make us the happiest subscribers EVER!!!
btw,
are all the give away of the Note3 have been made ?? i was waiting for the "send your app" contest, i really hope it's still on
thank you :-) !!!
I'll see what I can do. I still have 3 more phones to give away. The next contest starts soon
Derek Banas
Hi Derek! A fan of yours from India! :D
Are you planning to start a playlist for J2EE and ending with few frameworks (Hibernate , Struts etc) ? Would love to learn those from you!
Also , can you make a separate tutorial on GUI with AWT->Swings->JavaFX , this would be a great reference for any beginner IMO.
Divjot Singh Thank you :) Yes I seem to pretty popular in India. I'm going to cover everything that has to do with Java Enterprise after I finish up my next Android tutorial. Sorry about the wait.
PERFECT !!
Derek Banas Awesome! Thanks for replying!! :)
What helped me with this, is i typed along and paused every few minutes, ran it , deleted some stuff, changed some lines, ran it again to see what happens. Maybe i'm getting closer to understanding the constructures and the "Animal varname = new Animal();" thing. It calls for the stuff that's happening in the Animal(), running it, and naming it varname in my case ? I think xD. 12 minutes in, tbc tomorrow. I really want to learn this! :D Nice vid btw, thanks!
after watching this video I decided to apply for a job at McDonalds
If I can do it you can. You'll probably prefer this video th-cam.com/video/TBWX97e1E9g/w-d-xo.html
HAHAHAHAHAHAH FUNNY AND ORIGINAL XDXDXDXDXD
Derek you need to make a tutorial of how to apply for a job at McDonalds
Just learn python then
I just love programming.
Me too :)
This video is definitely not for beginners. lol
It's more suitable for those who've learned Java before and want to fresh up their Java skills
Hank Chan it’s not even good for that
Picked up my old Java textbook wanting to relearn on the language. Couldn't sit through the variable definitions and all that boring stuff. This video just saved me hours of reading time.Thanks.
Thank you :) I'm happy you liked it
Recursion? Graphics? GUIs? Data Structures? Exceptions? Generics? Animation? Events? Collections?
Yes this is the basic syntax of Java. The other topics you mentioned are covered here th-cam.com/video/TBWX97e1E9g/w-d-xo.html
Charles Darwin animals? Dogs,cats???!!?
These are the only videos I don't watch at 2x speed :)
me too ;)
LOL! He was talking too fast so I slowed down the speed on settings :D
Paul Negoita That's funny :) I think a lot of people do that.
Derek Banas yup, lol
Derek Banas Did not notice, but I usually speed up other people
also the video very hard to understand now but will be helpful for memory when I do learn this. Thanks for the video!
joe pelletier Feel free to ask questions. I'll be happy to help. I also have another Java tutorial that goes a normal speed here www.newthinktank.com/videos/java-video-tutorial/
Derek Banas can you help me to make an input dialog window with a custom title, question, and text in the input box that tells you what to type
@14:15 "Dont try to memorize this if your new.. but I doubt new people hung around for this.." haha, you knew who you had in mind when making it, and its really really well presented, Nice work, hadn't touched java in ages, got me back up to speed in 30 minutes. Many thanks good sir.
Thank you very much for sticking around :) I'm glad it helped