#5 Variables in Java

Поділитися
Вставка
  • Опубліковано 23 лис 2024

КОМЕНТАРІ • 91

  • @sofiavillaverde7006
    @sofiavillaverde7006 Рік тому +38

    Your content is better than most professors I’ve had in college! Great explanation and content!

  • @rajumallick8779
    @rajumallick8779 10 місяців тому +8

    00:03 Java development process and required tools.
    01:39 Software is built to solve real-world problems using virtual solutions
    03:13 Data can be stored temporarily in variables during processing.
    04:33 Java variables are used to store data
    06:03 Integers are used to store whole numbers, including negative values
    07:27 Using 'print Ln' in Java to print on new lines
    08:53 Create variables and assign values in Java
    10:18 We can create variables to store and manipulate values.

  • @SuriSyam2709
    @SuriSyam2709 Рік тому +19

    you are a life saver of many students sir.....

  • @codenissi
    @codenissi Рік тому +24

    That is a fantastic explanation, happy I got this course and had understanding about java.

  • @NaveenMaddela-yr4gb
    @NaveenMaddela-yr4gb 6 місяців тому +4

    U r a gem dude, u should be in IIT's.
    Remembering all the stuff from college days.
    U r better then many lectures & professors ( It's not mean they are not worthy, but u r next level in explanation)
    It's very easy to understand and remember more stuff in simple way.

  • @Nabie-b5m
    @Nabie-b5m Рік тому +9

    Your content is well explained here, I never understood Java until I have watched your videos.
    thanks so much for this great explanation.

  • @mohdfaizaanuddin510
    @mohdfaizaanuddin510 10 місяців тому +1

    = is a Assignment operator
    Assignment operator takes value from Right Hand side and it will assign it to the left hand side.
    Syntax of Declaring a Variable
    Variabletype variablename = value
    2) Every Statement must end with a Semi colon.

  • @simonason9342
    @simonason9342 Рік тому +22

    For anyone who have the issue "Error: Could not find or load main class Hello
    Caused by: java.lang.ClassNotFoundException".
    I solved this by:
    1 Save my project,
    2 Type "javac Hello.java" in terminal "push" "enter",
    3 Type "java "(classname)" in terminal "push" "enter"
    This made it calculate for me. I have no coding experience or how you use the symbole language so I hope you can follow the steps.

    • @sumiluckymikkubasant
      @sumiluckymikkubasant 4 місяці тому

      i got it thanks

    • @Jerrryy713
      @Jerrryy713 4 місяці тому

      Thanks bro i was suffering from past 15 min from this 🤌🏻😩

    • @Jerrryy713
      @Jerrryy713 4 місяці тому

      Bro isn't there a way were i dont have to save program everytime...if you could help 😅

  • @pinkprint3686
    @pinkprint3686 4 місяці тому +2

    I'm so glad I've found your videos! Super interesting! Thank you so much!

  • @kirankumarsb6507
    @kirankumarsb6507 Рік тому +5

    Great work sir,
    It will helpful for infinity of students ✨.

  • @DhileepChandu
    @DhileepChandu День тому +1

    sir, can you please speak slowly from upcoming videos!?

  • @basudevpaul8417
    @basudevpaul8417 Рік тому +4

    Enjoy your Content, Your content is great kudos 👏👏👏👏

  • @suraprashanthreddysura487
    @suraprashanthreddysura487 Рік тому +8

    what is happening when we are not storing values in the variable ,where the data is storing now? like S.O.P(2+3) do 2 require space and do 3 require space and the 5 require space if yes then where it is actually getting stored.

    • @manojarya7676
      @manojarya7676 11 місяців тому

      It's not getting stored anywhere.. simply giving the result by jvm

    • @misaonthefly
      @misaonthefly 5 місяців тому

      The data is stored in ram anyways... but it cannot be retrievable for later use... so it makes sense... if you are not gonna use a value more than once... don't save it in a variable

    • @khadeejahannah
      @khadeejahannah 2 місяці тому +2

      The literals 2 and 3 are constant values, and the result 5 is computed and stored temporarily in the stack before being printed. The JVM efficiently handles this without permanent storage

  • @krishna1085
    @krishna1085 3 місяці тому

    Thank you for this Full Java course Sir.

  • @sreesanth20
    @sreesanth20 6 місяців тому +2

    class Hello
    {
    public static void main(String a[])
    {
    System.out.println(3 + 5);
    }
    }
    for this code what i get is "Hello world" even after complier

  • @Ali-qy5lk
    @Ali-qy5lk Рік тому +9

    "Could not find or load main class Hello" - Any fix for this?

    • @deepak6683-n3s
      @deepak6683-n3s 10 місяців тому +2

      Click on (Run without Debugging) at the top of the editor or right click on the code and choose the run Java option.

  • @manojKumar-si4ml
    @manojKumar-si4ml Рік тому

    println() is method right and we are sending operations as arguments to that method.
    How println() taking those as arguments.
    Ex: whether it taking as string , its taking as string you need to mention those in "" right.

    • @shobhithjb4626
      @shobhithjb4626 Рік тому

      Actually There are multiple variations of println() available which takes int, float, long, String as arguments. Like println(String x), println(int x).... etc.

  • @venkivenkatesh83
    @venkivenkatesh83 4 місяці тому

    I am fresher, sir please send me the Java important questions

  • @rssvprasad9859
    @rssvprasad9859 Рік тому +6

    Thank you anna

  • @Rambkthanuman
    @Rambkthanuman Рік тому

    Thanku for this type of content sir ❤️🙏

  • @otienoodhiambo5952
    @otienoodhiambo5952 7 місяців тому

    i love this you are great lecturer

  • @vignesh-l3i
    @vignesh-l3i 2 місяці тому

    bro any extensions for java syntexes ??

  • @joshnasrikuchhe777
    @joshnasrikuchhe777 Рік тому +2

    Thank you so much brother

  • @challacharan1648
    @challacharan1648 Рік тому +3

    even though i changed the "Hello World" with (3 + 5) i could not get 8 instead again i am getting Hello World in terminal
    (ANY SOLUTION FOR THIS PLEASE REPLY QUICK)

  • @andreas23ds41
    @andreas23ds41 4 місяці тому

    Guys when I try it and use javac it makes and new byte bode instead of saving in the first file and when I want to run it error happens

  • @diynamicreddy3121
    @diynamicreddy3121 Місяць тому

    Please help me how fix
    PS C:\Users\devar\.vscode\Java\myprog> javac Hello.java
    error: file not found: Hello.java
    Usage: javac
    use --help for a list of possible options
    PS C:\Users\devar\.vscode\Java\myprog>

  • @TheKenWiley
    @TheKenWiley 10 місяців тому

    I do not have JavaC show up when I type java -version. How do I get that installed in my system?
    Everytime I try to run anything, like the basic sample above, I get "missing package" and/or "system" not resolved errors.
    What is missing? Libraries not found? How do I correct this?

    • @KHAREMAKARANDVASANT
      @KHAREMAKARANDVASANT 5 місяців тому

      When you download and unzip JDK and add the path of the bin folder inside to the "path" system environment variable, it should work.

  • @TanayKarn20147_alt
    @TanayKarn20147_alt 15 днів тому

    You are qualified to become a professor in IIT

  • @martinamillo969
    @martinamillo969 Рік тому

    So following this lesson, i wanted to create a VARIABLE for text. So I created this code
    1 class Hello
    2 {
    3 public static void main(String a[])
    4 {
    5 String name = Martina;
    6 System.out.print(name);
    7 }
    8 }
    When i compile it , it shows these errors
    Hello.java:5: error: cannot find symbol
    String name = Martina;
    ^
    symbol: variable Martina
    location: class Hello
    1 error
    Anyone knows why ?

    • @aktharishaik
      @aktharishaik Рік тому +2

      String values should be stored in double quotes(" ") : String name = "Martina"

    • @mahidhar6247
      @mahidhar6247 11 місяців тому

      " "

  • @rupesh171kumar
    @rupesh171kumar Рік тому

    Sir whick jvm are you using to run java

  • @yamaladeepika2086
    @yamaladeepika2086 9 місяців тому +1

    while i am executing the code i am getting an error called class was not found even though i create class name hello

    • @ArikeriUsha-yz8qv
      @ArikeriUsha-yz8qv 8 місяців тому

      Why coming error

    • @ArikeriUsha-yz8qv
      @ArikeriUsha-yz8qv 8 місяців тому

      What is the error

    • @LearnJava_Programming
      @LearnJava_Programming 7 місяців тому

      Everyone seems to be getting the same error and I did as well. Just delete the code runner extension in VS code. This should fix the error

  • @TaheraJhuma
    @TaheraJhuma Місяць тому

    my code is not working,, when i put 3+5 ,, and run the output comes same 3+5 ,,, not 8

  • @majeedabdulla8798
    @majeedabdulla8798 Рік тому +1

    I have recompliled and even deleted the old one but still wasn't getting 8 as an answer still getting hello world any clue to fix this.

  • @prabhutvawakodkar3620
    @prabhutvawakodkar3620 6 місяців тому

    hii
    i am facing a problem
    when i tried to compile the code, it was printing the earlier code i.e. Hello World.
    what can i do for that?
    how can i solve the problem?
    please help me

    • @umarawat12
      @umarawat12 4 місяці тому

      Firstly you have to save the code and then run

    • @ShivamKharawane
      @ShivamKharawane 2 місяці тому

      i was facing the same problem , what i have done is right click on file name in vs studio and click on run java .

  • @shreyashlawate9970
    @shreyashlawate9970 Рік тому

    sir when I do changes in my code and compile it it shows the old result not the new why it is happening?? like when we added 3+5 and 8+7 it gives output only 8

    • @martinamillo969
      @martinamillo969 Рік тому +6

      1 save the code by using CTRL+S or by clicking on File --> Save on top left of the screen.
      2 compile the new code by writing on the terminal "javac Hello.java"
      3 run it with "java Hello"
      In this way it should work.. anytime you change the code before compiling it you have to save the changes then compile it and then run it.

    • @0x.
      @0x. 9 місяців тому

      @@martinamillo969 you're actually too helpful thank you

  • @naseddinoufallah628
    @naseddinoufallah628 Рік тому

    Hi, i want code hhhhhhhh, ehere is code i can see that can you show me

  • @venkatamalla-s7l
    @venkatamalla-s7l Рік тому

    i compiled it and ran still its showing hello world instead of 8 any solution to this

  • @chillboy3650
    @chillboy3650 8 місяців тому

    Nice sir

  • @Shubham-fk4is
    @Shubham-fk4is Рік тому

    Nice

  • @Nkhugkvivnihy
    @Nkhugkvivnihy 9 місяців тому

    video lambi boht kartaha itu

  • @mohammedabdulkarim9878
    @mohammedabdulkarim9878 Рік тому +1

    Am facing an error of which (Error: Could not find or load main class Hello
    Caused by: java.lang.ClassNotFoundException:) can anyone help me out please.

    • @gopalkrishnan474
      @gopalkrishnan474 Рік тому

      Instead of typing the file name you created, type the class name.( For ex: java Hello).... this is name of the class here, not the file name you edit

    • @dreadhunter7114
      @dreadhunter7114 Рік тому

      same problem how did u solved it

    • @dreadhunter7114
      @dreadhunter7114 Рік тому

      @@gopalkrishnan474 bro im having the same problem could u explain it more specificly

    • @gopalkrishnan474
      @gopalkrishnan474 Рік тому +1

      @@dreadhunter7114 Dont type the name of the file, but the class name you created

    • @benjikoy
      @benjikoy Рік тому

      make sure you are in the correct directory when you run the command. if you used a package go to the location and run the command from there.
      javac /packagename/classname.java
      then
      java /packagename/classname

  • @codeblooded03
    @codeblooded03 10 місяців тому

    hi

  • @pow3rche
    @pow3rche Рік тому

    5:37

  • @AntarikshRajkonwar
    @AntarikshRajkonwar 6 місяців тому

    12/5/24

  • @b.o.8557
    @b.o.8557 Рік тому

    👍

  • @aszaw5342
    @aszaw5342 Рік тому +2

    is possible to run the code without compiling ? java hello.java

  • @stranger2k
    @stranger2k 9 місяців тому

    Thank you sir.