Java Programming

preview_player
Показать описание
MY UDEMY COURSES ARE 87.5% OFF TIL December 19th ($9.99) ONE IS FREE

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*

Like the channel? Consider becoming a Patreon! Check it out here:
Рекомендации по теме
Комментарии
Автор

Learn in One Videos for Every Programming Language

derekbanas
Автор

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

FunOrange
Автор

watch it at 2x speed and learn Java in 15 minutes

linusackermann
Автор

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.

danielh
Автор

I'm watching this to procrastinate studying for my C++ exam tomorrow, I have no idea what is wrong with me.

choppy
Автор

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. \n
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.
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] \n [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.

TheUltimateRPGOfficial
Автор

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

uestraven
Автор

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.

bkosm
Автор

like how you speak louder when explaining very important info in an ever world of increasing distractions and shorter attention span.

abcd
Автор

00:10 In: Pumped to learn Java
03:00 In: Currently filling out McDonalds job application.

ReIIay
Автор

"Arrays, they're basically boxes" ~ Derek Banas 2014

foxmcloudoriginal
Автор

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.

tonysanchez
Автор

I used to think I was smart. Programming taught me that I'm actually stupid. #RealityCheck

Crazywaffle
Автор

Correct title needed

"Java Programmming : Level 45 needed to proceed"

golu_badbola
Автор

after 10 min I started reading the comments :D

arditavdolli
Автор

I needed to review my java for an interview, and watched this at 1.75x speed; BEST REVIEW EVER!

wichieartu
Автор

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.

grzegorzkoziczak
Автор

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.

fraserpaine
Автор

Guys this video is so helpful if you want to review java syntax, it is NOT for absolute beginners !!

ehabelsaid
Автор

go to 0.50x speed and learn java in 1 hour

vyevd