Java Program Example: Add Two Numbers From a User #13

  Рет қаралды 72,838

Alex Lee

Alex Lee

Күн бұрын

Пікірлер: 59
@alexlorenlee
@alexlorenlee Жыл бұрын
If you’re new to programming but want a career in tech, I HIGHLY RECOMMEND applying to one of Springboard’s online coding bootcamps (use code ALEXLEE for $1,000 off): bit.ly/3HX970h
@team6ix610
@team6ix610 5 жыл бұрын
I learned 99% from this awesome tutorial than from my teacher
@ivanchan3673
@ivanchan3673 5 жыл бұрын
Thank you so much. I am totally a java beginner. Your step-by-step coding with explanation makes it much easier to understand the logic behind the code. Love & Peace :)
@Preposter
@Preposter 6 жыл бұрын
Nice! Your tutorials are well made and simple. Maybe you can combine all your tutorials from 2018 and make one huge tutorial for 2019. Why does this channel only have 344 subs? I swear a channel like this should have way more.
@alexlorenlee
@alexlorenlee 6 жыл бұрын
That's a great idea! I have thought about making one giant, complete beginner java tutorial. I may post more videos covering most of what would be learned in a Java 101 course and then combine them like you said. I hope that would be beneficial to you. Thank you for the kind words, we're definitely growing!
@wasimbenbrahim2559
@wasimbenbrahim2559 3 жыл бұрын
You are an actual life saver
@simmeronice
@simmeronice 5 жыл бұрын
Thank you so much. Your tutorial helped me so much in figuring out what I was supposed to fix on an assignment!
@sofianoor1058
@sofianoor1058 Жыл бұрын
Hey Alex, thank you so much for your explanation your awesome! I’m watching your videos and getting help to do my assignments.
@GupMotivation
@GupMotivation 3 жыл бұрын
Thank you for the simple and easy tutorial sir, Iloveyou
@VanajaPasupathi
@VanajaPasupathi 5 жыл бұрын
thank u so much sir....ur video was amazing..now am a java beginner also...i need much more videos
@CE-vd2px
@CE-vd2px 2 жыл бұрын
How do you get take both inputs jn the same line? Example: "Enter 2 numbers: " 3 4 7
@jeff055005
@jeff055005 4 жыл бұрын
Thanks for this video i hope to see more video
@エリカ-r4k
@エリカ-r4k 3 жыл бұрын
i learned so much thank you!
@bonolosebe4739
@bonolosebe4739 5 жыл бұрын
thanks for such an informative video, it is really effective
@alexlorenlee
@alexlorenlee 5 жыл бұрын
awesome, thank you so much!
@ahamster312
@ahamster312 5 жыл бұрын
Very clear. Thank you!
@abeshura
@abeshura 4 жыл бұрын
Thank you for this🙏🏾
@jeremiahjones1605
@jeremiahjones1605 2 жыл бұрын
This is like 4 years later and I am about to make $100 for a challenge and this really helps me understand. Thanks so much!
@deyanetsalmanov2618
@deyanetsalmanov2618 4 жыл бұрын
This video have been very useful for me. Thanks for video
@OhhAspireHD
@OhhAspireHD 6 жыл бұрын
Great video, thanks for the new info 👍🏽
@alexlorenlee
@alexlorenlee 6 жыл бұрын
Aspire anytime! Happy new year!
@aqua_whale
@aqua_whale 2 жыл бұрын
thanks for saving me on my computing homework
@princessangeladivina8984
@princessangeladivina8984 2 жыл бұрын
Omg!! I was shocked ur amazing it's make easier
@Razberrylol
@Razberrylol 3 жыл бұрын
Way better than how my teacher taught me, thank you so much
@iAtulu
@iAtulu 4 жыл бұрын
anyone know how to get the print to be: 3 + 5 = 8, and not just the number, or "the sum is 8"?
@handleunavailable._.
@handleunavailable._. 3 жыл бұрын
ye you have to write System.out.println("the sum is" + a + b)
@angelicamariesullano1963
@angelicamariesullano1963 3 жыл бұрын
Thank God found this😍 Thankyouu so much❤❤
@polar5903
@polar5903 5 жыл бұрын
I made the same program except in System.out.println I put System.out.println("The sum of the numbers "+ a +" and "+ b +" is "+ a + b); But when i ran the program and entered 2 numbers e.g. 3 and 5, it said The sum of the numbers 3 and 5 is 35... Why??? Here is the code of my program Pls. check and tell me why this is happening import java.util.Scanner; public class Adding { public static void main(String[] args) { Scanner scan = new Scanner(System.in); System.out.println("Enter a number"); int a = scan.nextInt(); System.out.println("Enter another number"); int b = scan.nextInt(); System.out.println("The sum of the numbers "+ a +" and "+ b +" is "+ a + b); } }
@soulshivam2887
@soulshivam2887 5 жыл бұрын
you not add those number write s=a+b;
@soulshivam2887
@soulshivam2887 5 жыл бұрын
please making vedio on how make software after execution of any program
@jordanlittle8774
@jordanlittle8774 2 жыл бұрын
Currently trying to figure out how to take two numbers from the same line of input and same them to two different variables for instance the user inputs 123456 8 I’m stuck on separating 123456 and 8 into two different variables that I can use for the rest of the program I’m doing. Any ideas?
@markoliver9196
@markoliver9196 3 жыл бұрын
Very helpful 👍
@bhavanipasupuleti5571
@bhavanipasupuleti5571 3 жыл бұрын
Thankyou Alex
@eggynogg3227
@eggynogg3227 3 жыл бұрын
How about dividing two number from a user?
@getnetalemye1851
@getnetalemye1851 4 жыл бұрын
thankyou man it is good for me
@deaktiviert-i6e
@deaktiviert-i6e 4 жыл бұрын
Hey. I did the Scanner like this: Scanner userInput5; userInput5 = new Scanner(System.in); calcnumber2 = userInput5.nextInt(); And i did an second one for the second number but when i combine the numbers it just shows the numbers for example when i type 2 and 4 then it only shows 24. Help me please
@juliussaikauskas6742
@juliussaikauskas6742 4 жыл бұрын
you have to declare calcnumber2 as an int so it's int calcnumber2 = userInput5.nextInt();
@mariloucubero4841
@mariloucubero4841 3 жыл бұрын
Thank you very very much ..
@bryanrhodunda4362
@bryanrhodunda4362 6 жыл бұрын
your the man bro
@alexlorenlee
@alexlorenlee 6 жыл бұрын
bryan rhodunda thanks bro, Happy New Year!
@chaoweii
@chaoweii 4 жыл бұрын
how about the first and second number together at input like this 10 10
@erikapazblanco407
@erikapazblanco407 4 жыл бұрын
wow 🥺😦 thank u so much ❤️
@jonellfernandez9176
@jonellfernandez9176 4 жыл бұрын
THANKS A LOT DUDE. MORE VIDEOS TO COME !
@TheresNothingToSee123
@TheresNothingToSee123 2 жыл бұрын
thank youu! 😭
@wdrdil
@wdrdil 3 жыл бұрын
Great!
@onlyprograming6789
@onlyprograming6789 3 жыл бұрын
Nice!
@mitalichakrovarty9829
@mitalichakrovarty9829 3 жыл бұрын
Bro youre awesome but can you teach this in bluej please please please😥😥
@nightmare_rex
@nightmare_rex 4 жыл бұрын
I get hired by facebook because I follow this video thx
@PeterOgbodu
@PeterOgbodu 2 жыл бұрын
i cant thank you enough
@kashif2309
@kashif2309 5 жыл бұрын
man, you look like Jordi!
@indian9196
@indian9196 Жыл бұрын
damn bro you're handsome
@lucasf.v.n.4197
@lucasf.v.n.4197 3 жыл бұрын
import java.util.Scanner; import static java.lang.Math.pow; import static java.lang.Math.sqrt; class baskara { public static void main(String args[]) { double a,b,c,delta; Scanner input=new Scanner(System.in); System.out.println("This program uses baskara formula"); System.out.println("to solve the quadratic equation:"); System.out.println("ax^2+bx+c=0 "); System.out.print("Type a: "); a=input.nextDouble(); System.out.print("Type b: "); b=input.nextDouble(); System.out.print("Type c: "); c=input.nextDouble(); delta=pow(b,2)-4*a*c; if(delta>0){ double x1=(-b-sqrt(delta))/(2*a); double x2=(-b+sqrt(delta))/(2*a); System.out.println("The roots are: " + x1 + " e " + x2); }else if(delta==0){ double x1=-b/(2*a); System.out.println("The root is: " + x1); }else System.out.println("No real roots"); } } ------------------------------------------------------------------------------------------------------------------------
@kalMHe
@kalMHe 3 жыл бұрын
*Please get rid of the background music, it is hard to listen to what you say and focus !*
@yogeshverma5272
@yogeshverma5272 4 жыл бұрын
Time waste
@TheresNothingToSee123
@TheresNothingToSee123 2 жыл бұрын
thank youu! 😭
Java Scanner Tutorial #14
12:37
Alex Lee
Рет қаралды 370 М.
For Loop Pattern Program In Java #25
15:49
Alex Lee
Рет қаралды 172 М.
Маусымашар-2023 / Гала-концерт / АТУ қоштасу
1:27:35
Jaidarman OFFICIAL / JCI
Рет қаралды 390 М.
Почему Катар богатый? #shorts
0:45
Послезавтра
Рет қаралды 2 МЛН
SLIDE #shortssprintbrasil
0:31
Natan por Aí
Рет қаралды 49 МЛН
Java Example Program to Add Two Numbers ( User Input )
6:50
Example Program
Рет қаралды 64 М.
Java Multiple Choice Quiz Program Tutorial #31
13:06
Alex Lee
Рет қаралды 26 М.
Naming Things in Code
7:25
CodeAesthetic
Рет қаралды 2,3 МЛН
Java random numbers 🎲 【4 minutes】
4:27
Bro Code
Рет қаралды 177 М.
How to get String Input from a User in Java #12
6:22
Alex Lee
Рет қаралды 272 М.
Java Enums Explained in 6 Minutes
5:58
Coding with John
Рет қаралды 278 М.
Methods in Java Tutorial #26
5:17
Alex Lee
Рет қаралды 495 М.
Java Strings are Immutable - Here's What That Actually Means
7:06
Coding with John
Рет қаралды 627 М.
Return Statement in Java #27
14:38
Alex Lee
Рет қаралды 285 М.
Маусымашар-2023 / Гала-концерт / АТУ қоштасу
1:27:35
Jaidarman OFFICIAL / JCI
Рет қаралды 390 М.