#5 Variables in Java

  Рет қаралды 312,202

Telusko

Telusko

Жыл бұрын

Check out our courses:
Spring and Microservices Weekend Live Batch : bit.ly/spring-live-weekend
Coupon: TELUSKO10 (10% Discount)
Master Java Spring Development : bit.ly/java-spring-cloud
Udemy Courses:
Java:- bit.ly/JavaUdemyTelusko
Spring:- bit.ly/SpringUdemyTelusko
Java For Programmers:- bit.ly/javaProgrammers
For More Queries WhatsApp or Call on : +919008963671
website : courses.telusko.com/
In this lecture we will learn:
- Working of Java code
- How is data stored in a database?
- What are variables?
- Syntax of variables
#1
-As a Java developer you write a Java code that will be having .java extension and that gets compiled by javac.
- When you compile that code what you get in output is a byte code that has .class file.
- Whenever you run .class file in the JVM, it means that it's a part of JRE that has JVM as well as libraries and a lot of classes, and JRE is installed on the OS.
- So, you need a hardware or machine having OS and then OS will have JRE and it has JVM. As a developer, one more tool is required known as JDK.
When you will install the new JDK, you will get updated JRE and JVM with it.
- We are using JDK version 17 in this course because of its long-term support.
- We develop software to solve real-world problems using the virtual world.
e.g., Amazon
#2
- Whenever we build a project or an application what we are doing is we are processing the data.
- Data may come from the user and then we do processing on it. A database is used to store the data and processing done on it.
- Database is permanent or persistent storage which means data will remain there if the machine gets shut down.
#3 Variables:-
- Variable is used to store the data temporarily while processing.
- Variable is a type of box in which you store data and a type is attached to it such as type can be number, text, image, etc. Thus, a box is known as a variable and a name and value are present with it.
- A variable is a container that holds the value while the Java program is executed.
- Java is a strongly-typed language as it demands the declaration of every variable with a data type.
- Syntax of creating a variable:
datatype variable name = value;
int num1= 3;
- Here, (=) is the assignment operator that takes the right-hand side value and assigns it to the left-hand side.
- println is used to go or print on the new line.
- In Java, every statement ends with a semicolon except blocks.
Github repo : github.com/navinreddy20/Javac...
Java:- bit.ly/JavaUdemyTelusko
Spring:- bit.ly/SpringUdemyTelusko
More Learning :
Java :- bit.ly/3x6rr0N
Python :- bit.ly/3GRc7JX
Django :- bit.ly/3MmoJK6
JavaScript :- bit.ly/3tiAlHo
Node JS :- bit.ly/3GT4liq
Rest Api :-bit.ly/3MjhZwt
Servlet :- bit.ly/3Q7eA7k
Spring Framework :- bit.ly/3xi7buh
Design Patterns in Java :- bit.ly/3MocXiq
Docker :- bit.ly/3xjWzLA
Blockchain Tutorial :- bit.ly/3NSbOkc
Corda Tutorial:- bit.ly/3thbUKa
Hyperledger Fabric :- bit.ly/38RZCRB
NoSQL Tutorial :- bit.ly/3aJpRuc
Mysql Tutorial :- bit.ly/3thpr4L
Data Structures using Java :- bit.ly/3MuJa7S
Git Tutorial :- bit.ly/3NXyCPu
Donation:
PayPal Id : navinreddy20
www.telusko.com

Пікірлер: 79
@sofiavillaverde7006
@sofiavillaverde7006 Жыл бұрын
Your content is better than most professors I’ve had in college! Great explanation and content!
@user-sl3ej5mw6w
@user-sl3ej5mw6w 10 ай бұрын
Your content is well explained here, I never understood Java until I have watched your videos. thanks so much for this great explanation.
@rajumallick8779
@rajumallick8779 5 ай бұрын
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.
@codenissi
@codenissi Жыл бұрын
That is a fantastic explanation, happy I got this course and had understanding about java.
@SuriSyam2709
@SuriSyam2709 Жыл бұрын
you are a life saver of many students sir.....
@kirankumarsb6507
@kirankumarsb6507 Жыл бұрын
Great work sir, It will helpful for infinity of students ✨.
@simonason9342
@simonason9342 9 ай бұрын
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 16 күн бұрын
i got it thanks
@Jerrryy713
@Jerrryy713 Күн бұрын
Thanks bro i was suffering from past 15 min from this 🤌🏻😩
@Jerrryy713
@Jerrryy713 Күн бұрын
Bro isn't there a way were i dont have to save program everytime...if you could help 😅
@rupesh171kumar
@rupesh171kumar Жыл бұрын
Sir whick jvm are you using to run java
@NaveenMaddela-yr4gb
@NaveenMaddela-yr4gb 2 ай бұрын
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.
@pinkprint3686
@pinkprint3686 20 күн бұрын
I'm so glad I've found your videos! Super interesting! Thank you so much!
@andreas23ds41
@andreas23ds41 17 күн бұрын
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
@basudevpaul8417
@basudevpaul8417 Жыл бұрын
Enjoy your Content, Your content is great kudos 👏👏👏👏
@theamritjha755
@theamritjha755 Жыл бұрын
Thanku for this type of content sir ❤️🙏
@naseddinoufallah628
@naseddinoufallah628 9 ай бұрын
Hi, i want code hhhhhhhh, ehere is code i can see that can you show me
@joshnasrikuchhe777
@joshnasrikuchhe777 Жыл бұрын
Thank you so much brother
@rssvprasad9859
@rssvprasad9859 Жыл бұрын
Thank you anna
@mohdfaizaanuddin510
@mohdfaizaanuddin510 6 ай бұрын
= 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.
@otienoodhiambo5952
@otienoodhiambo5952 2 ай бұрын
i love this you are great lecturer
@Ali-qy5lk
@Ali-qy5lk Жыл бұрын
"Could not find or load main class Hello" - Any fix for this?
@deepakmallareddy6683
@deepakmallareddy6683 6 ай бұрын
Click on (Run without Debugging) at the top of the editor or right click on the code and choose the run Java option.
@suraprashanthreddysura487
@suraprashanthreddysura487 10 ай бұрын
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 7 ай бұрын
It's not getting stored anywhere.. simply giving the result by jvm
@misaonthefly
@misaonthefly Ай бұрын
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
@TheKenWiley
@TheKenWiley 6 ай бұрын
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 Ай бұрын
When you download and unzip JDK and add the path of the bin folder inside to the "path" system environment variable, it should work.
@shreyashlawate9970
@shreyashlawate9970 11 ай бұрын
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 8 ай бұрын
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. 5 ай бұрын
@@martinamillo969 you're actually too helpful thank you
@Shubham-fk4is
@Shubham-fk4is Жыл бұрын
Nice
@user-te6km7hz6p
@user-te6km7hz6p 11 ай бұрын
i compiled it and ran still its showing hello world instead of 8 any solution to this
@majeedabdulla8798
@majeedabdulla8798 11 ай бұрын
same is there any solution you know of?
@majeedabdulla8798
@majeedabdulla8798 11 ай бұрын
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.
@eternalexplorer4471
@eternalexplorer4471 11 ай бұрын
Save the code and then compile and run
@yashchavan7384
@yashchavan7384 4 ай бұрын
thx @@eternalexplorer4471
@kalyanmondal3468
@kalyanmondal3468 3 ай бұрын
❤​@@eternalexplorer4471
@chillboy3650
@chillboy3650 4 ай бұрын
Nice sir
@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.
@yamaladeepika2086
@yamaladeepika2086 4 ай бұрын
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 4 ай бұрын
Why coming error
@ArikeriUsha-yz8qv
@ArikeriUsha-yz8qv 4 ай бұрын
What is the error
@LearnJava_Programming
@LearnJava_Programming 3 ай бұрын
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
@prabhutvawakodkar3620
@prabhutvawakodkar3620 2 ай бұрын
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 2 күн бұрын
Firstly you have to save the code and then run
@challacharan1648
@challacharan1648 Жыл бұрын
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)
@user-im6vi8wt7i
@user-im6vi8wt7i Жыл бұрын
compile it first and then run it
@majeedabdulla8798
@majeedabdulla8798 11 ай бұрын
compiled it and it still didnt change?@@user-im6vi8wt7i
@sunmethasunmetha3502
@sunmethasunmetha3502 11 ай бұрын
Save it and then compile and run
@martinamillo969
@martinamillo969 8 ай бұрын
thanks you really saved me!!! @@sunmethasunmetha3502
@sahilpatildreamer
@sahilpatildreamer 7 ай бұрын
Very helpful
@venkivenkatesh83
@venkivenkatesh83 21 күн бұрын
I am fresher, sir please send me the Java important questions
@martinamillo969
@martinamillo969 8 ай бұрын
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 8 ай бұрын
String values should be stored in double quotes(" ") : String name = "Martina"
@mahidhar6247
@mahidhar6247 7 ай бұрын
" "
@b.o.8557
@b.o.8557 Жыл бұрын
👍
@sreesanth20
@sreesanth20 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
@yasmeenshahana4860
@yasmeenshahana4860 Ай бұрын
Once try again I got the answer
@ritikraj6523
@ritikraj6523 Ай бұрын
first save the code by cntrl+s then try
@andreas23ds41
@andreas23ds41 17 күн бұрын
Bro it's not working ​@@ritikraj6523
@Theamanbasnet
@Theamanbasnet 9 күн бұрын
@@ritikraj6523 thanks
@pow3rche
@pow3rche 10 ай бұрын
5:37
@mohammedabdulkarim9878
@mohammedabdulkarim9878 Жыл бұрын
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 Жыл бұрын
@@dreadhunter7114 Dont type the name of the file, but the class name you created
@benjikoy
@benjikoy 10 ай бұрын
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
@anirudhgoyal5603
@anirudhgoyal5603 6 ай бұрын
hi
@AntarikshRajkonwar
@AntarikshRajkonwar 2 ай бұрын
12/5/24
@Nkhugkvivnihy
@Nkhugkvivnihy 5 ай бұрын
video lambi boht kartaha itu
@stranger2k
@stranger2k 5 ай бұрын
Thank you sir.
@aszaw5342
@aszaw5342 Жыл бұрын
is possible to run the code without compiling ? java hello.java
@challacharan1648
@challacharan1648 Жыл бұрын
no
@rohit8hjj
@rohit8hjj 7 ай бұрын
yes its possible
#6 Data types in Java
12:19
Telusko
Рет қаралды 250 М.
#4 How Java Works
12:03
Telusko
Рет қаралды 390 М.
I Can't Believe We Did This...
00:38
Stokes Twins
Рет қаралды 123 МЛН
Я нашел кто меня пранкует!
00:51
Аришнев
Рет қаралды 5 МЛН
Каха и суп
00:39
К-Media
Рет қаралды 6 МЛН
ОСКАР vs БАДАБУМЧИК БОЙ!  УВЕЗЛИ на СКОРОЙ!
13:45
Бадабумчик
Рет қаралды 6 МЛН
Functions in Python are easy 📞
10:38
Bro Code
Рет қаралды 423 М.
Array vs. ArrayList in Java Tutorial - What's The Difference?
17:36
Coding with John
Рет қаралды 505 М.
Variables in Java ✘【12 minutes】
12:32
Bro Code
Рет қаралды 185 М.
#26 Stack And Heap in Java
12:37
Telusko
Рет қаралды 212 М.
Scope and Local Variables in Java
9:41
Neso Academy
Рет қаралды 83 М.
C++ Tutorial for Beginners - Learn C++ in 1 Hour
1:22:56
Programming with Mosh
Рет қаралды 3,8 МЛН
Primitives Data Types In Java - All the Primitives And What They Do
10:24
#24 Methods in Java
11:30
Telusko
Рет қаралды 189 М.
Зачем ЭТО электрику? #секрет #прибор #энерголикбез
0:56
Александр Мальков
Рет қаралды 627 М.
САМЫЙ ДОРОГОЙ ЧЕХОЛ! В стиле Mac Pro
0:35
Romancev768
Рет қаралды 100 М.
Battery  low 🔋 🪫
0:10
dednahype
Рет қаралды 12 МЛН
Собери ПК и Получи 10,000₽
1:00
build monsters
Рет қаралды 2,8 МЛН
КРУТОЙ ТЕЛЕФОН
0:16
KINO KAIF
Рет қаралды 6 МЛН
Красиво, но телефон жаль
0:32
Бесполезные Новости
Рет қаралды 1,4 МЛН