Fireship · @fireship

Java in 100 Seconds

Uploaded November 3, 2021 · Length 2:25

Java in 100 Seconds

Summary

java basics explained in 100 seconds, including compilation, syntax, and object-oriented programming

  • java programming language
  • java basics
  • java tutorial
  • java syntax
  • object-oriented programming

Transcript preview

The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.

  1. 0:00

    Java a highlevel multi-paradigm

  2. 0:02

    programming language famous for its

  3. 0:04

    ability to compile to platform

  4. 0:06

    independent B code it was designed by

  5. 0:08

    James Gosling in 1990 at Sun

  6. 0:10

    Microsystems one of its first

  7. 0:12

    demonstrations was the star 7 PDA which

  8. 0:14

    gave birth to the Java mascot Duke today

  9. 0:17

    it's one of the world's most popular

  10. 0:19

    programming languages it Powers

  11. 0:20

    Enterprise web apps with spring

  12. 0:22

    framework Big Data pipelines with Hadoop

  13. 0:24

    mobile apps on Android and even things

  14. 0:26

    like the controller for NASA's Maestro

  15. 0:28

    Mars Rover what made jav but Innovative

  16. 0:30

    is that instead of compiling to machine

  17. 0:32

    code like C or C++ it compiles to bik

  18. 0:35

    code that can run on any operating

  19. 0:37

    system without recompiling which is made

  20. 0:39

    possible by executing the code with the

  21. 0:41

    Java virtual machine or jvm it's both a

  22. 0:44

    compiled and interpreted language at the

  23. 0:46

    same time the computer just needs to

  24. 0:48

    have the Java runtime environment or JRE

  25. 0:50

    installed and most of them do for

  26. 0:52

    developers this means right once run

  27. 0:54

    anywhere it's a strongly typed language

  28. 0:56

    with a curly bra syntax similar to the C

  29. 0:59

    family how however it provides more

  30. 1:01

    highlevel features like garbage

  31. 1:02

    collection runtime type checking and

  32. 1:05

    reflection to get started install the

  33. 1:07

    Java development kit or jdk then create

  34. 1:09

    a file ending in Java every Java program

  35. 1:12

    starts with a class name which should

  36. 1:14

    also match the file name the class is

  37. 1:16

    required to have a main method this is

  38. 1:18

    where your code will start executing

  39. 1:20

    inside the method Define a variable by

  40. 1:22

    starting with a type followed by a name

  41. 1:24

    and value we can then print it to the

  42. 1:26

    standard output using the built-in

  43. 1:28

    system class now because we're inside

  44. 1:29

    inside of a class we Define functions as

  45. 1:32

    methods on this class the public keyword

  46. 1:34

    means that it can be used outside of

  47. 1:35

    this class and static means that it's a

  48. 1:37

    member of the class itself as opposed to

  49. 1:40

    an instance of the class we then provide

  50. 1:42

    a type and name and return a value from

  51. 1:44

    it you can Define your own custom

  52. 1:46

    classes which are blueprints for objects

  53. 1:48

    then add attributes and methods to them

  54. 1:50

    use the new keyword to instantiate an

  55. 1:52

    object from the class it feels very

  56. 1:54

    objectoriented but has evolved to

  57. 1:56

    support functional patterns like

  58. 1:58

    Anonymous Lambda methods when your PR is