Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
Variables in Java | Input Output | Complete Placement Course | Lecture 2
Play lesson

Java & DSA in 30 days : Course for Placement - Variables in Java | Input Output | Complete Placement Course | Lecture 2

Master the Java programming language with Apna College's comprehensive course. From basics to advanced topics such as loops, data structures, and algorithms, enhance your coding skills for placements with expert-led lectures.

4.0 (1)
8 learners

What you'll learn

Java fundamentals including variables, input/output, and conditional statements
Deep dive into loops, patterns, and functions to enhance programming skills
Understanding data structures such as arrays, linked lists, stacks, and queues
Mastering advanced concepts like recursion, sorting, and HashMaps for efficient coding

This course includes

  • 33.3 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Keywords

Full Transcript

Hi everyone and welcome to our college Rajambh Bhaat kare wali hai, jawa ke ek kuch basic fundamental topics ki in topics ke andarajambh Bhaat karenghe output kese dhete hai, jawa mein variables kya ho te hai, data types kya ho te aur actually user se agar mein input lehn hai, to ho kese karenghe hum jawa ke andar. Is mein sub se bili bhaat karenghe, pehle topik ki yani output kese lehn hai, jawa ke andar. Abh output kileh hume ek line ko shurwaad se hi yad kar ke rakna hai, ye line hai, our system.out.print hello world, hello world is mein variable cheezer, jis ko aap ko yad nahi rakna, baasik syntax ki line kese likejari hai, ushe hume yad rakna hai. Abh iska kya mat lag hai, jawa ke andar klaasas kya ho te hai, ye hume ek ups nam ke topic mein bhaat mein padinghe ki klaasas kya ho te kya ho te hai, jawa ke andar klaasas kya ho te hai, ye hume ek ups nam ke topic mein bhaat mein bhaat mein bhaat mein bhaat mein bhaat mein klaas kya ho te hai, our system.out.print hain, abhik ke lihe hume man ke chalna hai ki jabe hume this line ko likhre hunge, matlam hain ril ye jawa mein output print ho jai ka.

aur kya output print ho jai ka. kye jabe hume this line, ye prin thesis, ye yani, ye jo braces, ye jo brackets laghe huay hume aris sentence mein, eske anndar agaram double courts lagade, a double courts ke in beach mein hume jo bhi cheez like hege, wo humeare lihe humearei window mein, i.e. consult screen mein, jabhan kod likhre hunge, ostime par humearei user ke lihe print ho jai ka. ups ke saat ke saat, esle line ke baad ek semi kolin aad hai.

To jawa mein saare ju sentences ho te hai, saare commands ho te hai, wo semi kolin se khaa dam ho te hai. Jabtak haap semi kolin nahi lagaate, taptak haap ki line chaltee rei ki, jase English mein agaram mein kise line ho terminate karna ho te hai, to hamapat dot lagade tein, hindi mein hume danna lagade tein. Use i tari ke se jawa ke anndar, jo boho chari programming languages ke anndar, ham semi kolin lagade hege, ye dekhane ke lihe ki, jawa ek anndar, jaa wa khaa dam ho gaiye. Aam baad kane iss output ki, to jawa hai haap, jaa wa hai haap, jaa wa khaa dam ho gai, yea daa wa khaa dam ho gai, yea daa wa khaa dam ho gai, jaa wa khaa dam ho gai, jaa wa khaa dam ho gai, jaa wa hai haap, agaram double quotes ki, jage single quotes use karte to bhi haap ka output print ho jai ka, leke nye uswili bhai convention languages mein, jaa et lise jawa mein, jabi am print kar vata hai, to double quotes use karte hai, strings ke leke hi ki haap ar ek tereke se hello world, ek string hai karrektas ki, mazap karrektas ko jod ki haap nake, sentens banaadia, ek word banaadia, tokens ka collection banaadia, jase aap am print kar vata hai.

Aam bhi haap ne kaafisari baat kali hai, ispuri ki puri statement ke baare ne, isko bohaat achi se saamach paayenge, jawang code kar raiyoin, to isko aakchili editor mein ham likar dhe ktein, yehaa paa jawang editor use karein, dat is intelligent, abiske alaba aap netbeans eclips, jase kui haa editor bhi uskar sagtain, abis kode ke andar haam dhe k paayenge, yehaa paa kech paakge jasi statement hai, kech li kaa hai, yehaa paa reklaas haamidik reayai, isklaas ka nam haam saamach saaktain ki main hai, yehaa paa kuchpublic static void likar wa hai, isko naam bhi main hai, iskender kuch kushlainne liki huye, to ispuri ke puri k code ko jubbaid default, at aati se bhi editor ke andar, isko boilerplate kode kye, boilerplate kode yehain, jukkode pehle se bai default haamid, mila hoot hai, isko kode ke baare ne, ham dhe re, dhe aane wale lectures mein aur detail mein padraayongi, ki classes kyea ho ti hain, yehaa function kyea hota hai, paramitas kyea hoothe hai, package ko import kye se karte hain, package ko define kye se karte hain, konsa package ke andar ouri file hain. To yeh saari chisko ke baare ne, hameh abhi tension lene ki zharurat nahi hai, hameh manna hai ki editor par hameh, jo ye boilerplate bai default kode dikar hai, hoothe kye hain, hameh isi ke andar apni programming karengi, jitna bhi haam kode karene wale hain, japta kaam baakhi chisne seek ne lete, wo saara ka saara kode hameh sa main function kye andar likihain, i.e. ihtnis pace meh, yahaa se lekar agar next line, to yis puri space ke andar, is main ke andar, jabi kerli braces se shuru ho raha hai, kerli braces se end ho raha hai, iis pace meh haam saara ka saara ka saara ka saara, hameh kode likihain, wo rusko exikute karengi, to hameh baat karehe hai, jawa meh output kyei, hameh na ek statement sikhi ha abhi, usko likkar dekte hai, statement these system.out.print aur print meh, hameh ne leghai te double codes, hameh ne lekha tha, hello, world. aur baad meh leghai te semi-coded, yeh dekhani ke le, ki hiyaa paar hameh rilain terminate, kargai khaa tha maugai.

Is kode ko hameh ne leke liya, abhi herea par intelligent meh, upaar jaakar green color ka ek run button odai, ki aapka kode rann karja ajatna bhi haapne leke dia. Is green button ko hameh klikkarne, to hameh ril yeh, niche ek output screen hameh dekriyeo ki, is ko tota expand kar le te hameh. aur is screen ke under koos kuch kuch output print hoaay, upaar kuch hameh location, kuch dhikhai dairai. But beach meh, jo print hoaay, hoaay, hameh ril, actual output heaani, hello world.

Heloa world print hoaay, process finished with exit code zero. Yeh keyo print hoaay, yeh to hameh ne double codes meh, ne lekha tha. aur hameh raja lo output hea, wo hameh ril yeh print hoaay. Aapkhe s double codes ke anndar hameh hello world With Java bhi agar lik de te, aur ushe dhubhara hameh execute kar aate, to haap dekhe kye, abha meh ril yeh, hameh ril yeh print hoaay, hello world with Java.

Basi ke link in double codes ke anndar hameh jo bhi kuch print kar waana chainke, wo hameh ril yeh, hameh ril yeh print hoaay ka raja ajah, hameh ril yeh, Print, which is a function in the inside. Means, this function has passed through your string and whatever you pass through this function will be printed for us in this window. Now, many students who come from different languages which have already passed through C++ or Python C, will understand that it is printed in the function. New students may not be worried, but they will be coming with a little time.

Now, we can understand that this function is a class and this is our string which we have printed. Now, this is another way to print in Java. For that reason, what we do first is copy this line. Control C, Control V.

We copied this line. Now, if we run this code, then we will print the output screen on the screen. It will be something like this. Hello world with Java and hello world with Java.

Now, this is printed in the same line. But what we want is a different line. So, what we want is that whenever we print it, then we will print it on the next line. And how it will be possible?

This will be possible in Java that we will give the name print ln in another function. Now, here if we write print ln in the print, what will happen? Now, run this code again. So, for that output, we will see something like this.

Where, in the first line of Java, we printed it in the first line of Java. And because of using the print ln, when the first line of print will be printed, then the next line will be coming. Now, this line of print, if we want to print a third time again, then we will also print it in the next line. We will print it here.

And if we run it again, then we will have three lines for us. Then, we will have one print, which we want from the same way. So, we have printed two methods in Java in two ways. One is used in print, which is not in the next line, but the other is used in print ln, which is in the next line, which is given in the output to print.

Apart from this, for leaving a line of the gap, one more method in Java. This is the method that if we print ln, and within our string, we write in double quotes, backslash n. Backslash n means next line. So, print this output, and then, we will go to the next line, which is the next line, which is being stored on our screen.

We will do the same thing in the next line, backslash n. Now, if we run this code again, then we will observe the output, which is the same output, or the first one. Now, we have not used print ln, we have used print. But, backslash n helps us with the help of our next line, which is the output of our next line, which is in the output of our next line.

So, in Java, we have to print out the output in three ways. In this way, we will explain more about these methods. So, the first method in this method is our print. Printing means, we will write in line, we will write in the next system, dot out, dot print.

In this print, we will write in double codes, in single codes, and we will write in the same code, so, we will get output print for our next line. But, in that output, we will not write in the next line. So, after writing that output, you want to print something else, then it will be in the same line. But, you want me to print everything, then, in the same line, we will print everything in the next line.

For that, we will use print-align. Print-align is also used in the same way, system.out.print-align. Then, we will write in double codes, which we want to write in the same way, then, we will write in the terminator, that is, our semicolon. And, because of this, our output is the output of our next line, which is the output of our next line.

In addition, we will write in the next line, which we write in the backslash-n. Whenever we write in any sentence, we write in the backslash-n. So, there, the print we have already printed, and then, the print we have printed, suppose, the first print was to be printed, and then, the print was to be printed. So, after the print was printed, then, in the next line, we will not print in the same line.

Let's look at the code of this. If we remove both the lines, and write here, this hello world with Java, from our cache, and if we run this, we will see, that this hello world with Java, is the first print, and from our cache-print, is the next line. So, this is the magic of the backslash-n, which is the next line, which will be printed in the next line. If we write here two backslash-n, then what will happen?

So, in the first line, from print, in the second line, and backslash-n, the print will be printed in the next line. Now, here, the space we have, before our cache-n, or backslash-n, we have given space for this. So, we cannot take tension here. We can remove this.

So, we have seen the three ways of output. Now, let's talk about the question. Let's solve the question and see, for the output. The question is, what is the pattern?

We have to print stars. The stars have to print in some way, that first, we have a single star. Second, we have two stars. Similarly, we have three stars in the third line.

There are four stars in the fourth line. This is a little pattern, which you have to print here. It is well displayed here. How we will print this pattern?

Let's see, first of all, we have to print one star. That is, the print statement, which we have written in the short, we have to write something in it, like a star. We have to write two stars in the second line, which we have to write in one print statement and two stars in the second line. Similarly, we have to write a third line in the print statement, and we have to write three stars in the third line.

We have to write all the double quotes. So, we have to do something like this, which will be printed from its help. Now, if we try to do this code from the code, then we will remove our old code. Now, in the IntelliJ, there is a shortcut, it is system.out.print.

There is no written statement in the whole, so whenever we print out, whenever we write out, then we press the tab on the keyboard on the left side of the tab, then we press the tab on the left side of the tab. So, we have system.out.print.out.print.out.print.out. We can write our output in the IntelliJ. We will write in that star.

Now, we have written one star. So, in one line, we will print it. Then, in the next line, we have to print it. So, here we will write two stars.

Now, we are using L and S. L and S. Because, first we want to write star in the first line. Then, we want to write star in the next line.

Now, the same thing. We will print 4 stars here. So, here we will print 3 stars. Here we will print 4 stars.

So, in this way, we have written 4 statements. Now, let's run and see. So, we have come out of the output. In which we have 1 star, 2 star, 3 star, 3 star and in this 4 star.

So, we have solved our question. We have solved 4 print statements. Now, let's go ahead and read the loops topic. When we read patterns, we will also learn how to optimize it.

But, now, we are in the beginner stage. That is why, we are printing the same line again and again. Later, we will optimize our codes. We will get better time in complexity.

We will display a lot of outputs in less code. After that, let's talk about the quiz. For the same output. Now, we have got all the questions and quizzes.

So, the topic is important. We will start with the same method. And, we will practice some questions again and again. So, we will get a little bit of a debate in our brain.

So, we will get a lot of help. When we go ahead and learn more advanced things, then, we will get some basic things. We will get back up the mind. So, let's talk about the quiz.

There is a question in the quiz. We have to print star and in the next line, 2 stars. Okay. For that, we have given three options for the code.

We have to tell you which code is correct in these three options. That means, if we talk about these three, then which code is correct in these three, we will give this in the actual output. Let's talk about it. First of all, we analyze A.

When we analyze A, then we will give it to system.out.println. We have written star backslash n. With that, we have two stars. Now, let's try to print.

So, first of all, we will print star. It is printed. After that, we have come to the backslash n. That is, now, we will print something on this same line.

We will try everything after it. So, we have come to the next line. We will print two stars on the next line. So, we have printed two stars.

If we match this output, then it is completely matching. That means, the answer A is our correct answer. But we will analyze both the other statements. Now, if we talk about B, then B is our star star.

Then, backslash n. Then, another star. So, first of all, we will print star star. In the same line.

Because, the backslash n has not come. So, the two stars have printed. Then, backslash n. We have come to the next line.

Then, another star. So, we will print star in the next line. Now, the output for us is not the same as the input. That is why, we will do this discard.

Because, this is a wrong code. The output we wanted. Then, let's talk about C. C is given in C.

Star star star star backslash n. That is it. So, what will happen in this? Star star star star star.

Star star star star same line will print. And, then, backslash n. That is, we will go to the next line. But, nothing happens.

That means, this line will remain empty. So, our output will come. The wrong output is the output that we wanted. That is why, the correct answer is A.

So, in our quiz, we will write the correct answer. A. So, in this way, we solved the quiz. And, I hope that we will understand very well how we will output the answer.

Which two or three popular ways we can output the answer. For different things. Now, let's talk about the variables in the answer. Variables are a very important topic.

All the codes are also made. Even, you do basic programming. When we do a competitive DSS, variables are very important. Basically, building blocks of the answer.

So, what is variable? Like, we used to study in the 12th Maths in the 11th 12th. Like, for example, we did not ask a question. Even, in the 6th class, when we were in rectangle square, circle in the area of circle, we were in rectangle.

Suppose, we have given this rectangle. Which is the length of one side, and the other is the length of the other side. Now, we have taken 1 value 25. B value 10.

If we had to take a perimeter, then it would have been formula 2 into A plus B. So, we had to remember the math in this formula. So, the A variable was a variable. B was a variable.

How was this variable? Because, its value was not fixed. It was changing. Now, in the next question, we can take another rectangle.

We can have 2 or 3 lengths. Take this, take this, take this, and take this. So, the value of the rectangle is changed. The name is A or B.

But, its value is changed. So, this is the variable. So, if we look at this perimeter, then A and B are not fixed. It is changed.

So, we say this variable. But, there are some things that are fixed. We say these things are constant. Like, in perimeter, 2 is a constant.

We know that 2 is the value of 2. If we take pi's value, i.e. 3.14, we will always be 3.14 or 22 by 7. So, we say that we are constant.

Or, take the example of characters. A, B, C, D. Now, the value of D is 35. If you have a value of D, my name, or D value of D, at the rate.

D value can not be F. D value of D is D. So, these words, these characters, these numbers. We say that we are not changing the value of constants.

Now, we try to understand that if we define variables in the match, then how to define the variable in the match? First of all, let's talk about the memory of the computer. This memory is the memory that all the data in the computer is stored inside the computer. Let's assume that the data inside the computer is stored in small blocks.

That is, this memory has been divided into many parts in a way. And every part has its own address. That means, this part has some other address, some other address, some other address. Every different address has a different data stored.

So, there are small blocks inside this memory, which have different type of data, a lot of data stored inside the computer. Now, whenever we define the variable in Java, for example, we write, int A is equal to 25. int B is equal to 10. Now, here, we will ignore that what is int in this?

We will talk about it in a little while. But, in a way, we will tell you that A is a variable, which has a value of 25. B is a variable, which has a value of 10. What does it mean?

It means that in the memory, you go on a block. In that block, you store 25. So, you store 25. And you give that block a name.

In this way, you just define the variable in Java. There will be something similar to that B. That means, we will go inside the memory. We will give that memory location name to it now.

If the variable is B, that means, we will give this value location to it. And here, in this location, we store the actual value of the actual value. That is, 10. So, now, if we want to store something else, like we used to store numbers, Now, we want to store some string.

We want to store some names. So, what we will do? Write something like string. string name is equal to, let's say, Tony.

Star. So, what will happen now? Let's ignore this string for a while. We have made some name variable, name name.

The value of the name is Tony. So, inside the memory, here, we will find this location, which means, we will give random location. And inside this, the string will be stored in the entire area. Now, here, these squares are rectangles.

They will be visible in the same size. But, inside the memory, they are not in the same size. This size of the entire area is different. Like, if you want to store numbers, then the size of the entire area will be different from the size of the string.

So, we will look at the rectangles, and see that they are stored in the same size. All the different types of data are stored in the memory of the entire size. But, the same thing is that, the variables are stored in the memory of the string. Now, let's understand the code of the variables.

How do we actually show the variables? How do we show the code inside? Because, we have discussed the theory. The code needs to be written in it.

So, we are talking about the variables in our code. Let's check the screen a little. So, first of all, what do we do? We define a name.

That means, we have to write a name. So, we will make a name for the variable. For now, we don't have a string type, but we don't talk about the string. We define the variables in the Java, and we write a name.

We will write no name inside it. So, we wrote a name. If we want to define the size a and b, then how do we do that? A is equal to 25, B is equal to 10.

So, in this way, we have written different statements, to define the variables. If we had to give this age here, then we would have given it. Apart from that, there are many more things. Now, we assume that we have bought something from the market, a pencil, which is 25 rupees and 25 rupees.

So, the type will be more, the name will be price, that is, the name of the variable price. And we write the value of its value, 25.25. So, in this way, we define many variables in our code. Now, the value of its value is the value of its value.

That is, if the value of b is 10, then we will do the same 20, no error will come. Apart from that, if our name is now here, then we can change the value of its name and do something else. So, our value will change, no error will come. Now, let's talk about this.

In our code, this is int, double string. What we have written with these variables. So, we call all these things as data types. Now, what are the data types?

So, if we talk about the Java, then Java is a type language. Type language, that is, before you tell anyone in this language, you have to tell them that what is the type of variable? If you are writing numbers, then what type of numbers are you writing? Is it a fixed floating value number?

And the decimal point is in that number. Do you have to define a string? Or is it a fixed Boolean? Or a character?

So, these types, we have to remember that, before defining any variable inside, we have to tell them that what is the type of variable? So that you can get the same size block in memory. Now, there are many languages like JavaScript, a weekly type language. So, you don't have to tell them that what type of variable you are making?

If you write a letter, then you will detect your variable in your language. But, Java has to be told that, it has to be told in C++. So, let's talk about data types. So, these are two types.

First of all, our primitive types, that is, basic data types, which we have to remember, are non-primitive data types. Non-primitive data types can be customized, they can be made from their own designs. We can create them as a programmer, but the primitive data types are first in Java. Java has eight primitive data types, which are called byte, short, care, Boolean, int, long, float or double.

Now, these are the different types. These types have the size of the memory, they are different. If we talk about them in short, then the size of the memory of byte is 1 byte. 1 byte means 8 bits.

Now, we know that in a computer, there are some things in the memory, so, there is a form of 0 or 1. 1 0 or 1 means 1 bit. So, in this way, we take 8 0 1s. So, 1 byte means 8 bits.

So, 1 byte is the memory, that is, 1 byte. In the same way, if we talk about, the care is an important data type, which takes 2 bytes. Boolean takes 1 byte again, which takes 4 bytes, 8, float, and double, and double, and double. So, in this way, the different types of data are taking different numbers of bytes in the memory.

Now, we will talk about, the system inside, the int is taking 2 of the 4. So, there is a difference between the system. Because these bytes are 64 bits. Some systems, which are 32 bits, come with them.

There is a little bit of memory allocation. So, they can depend on the system, but usually, whenever we talk about numbers, they are talking about 64 bits, that is, these numbers. Now, the link in the description box, which is in the description box, the notes, you will get the whole description, which is how many bytes, so, now you need to remember, just understand how many bytes. Now, we will focus on this video, mostly on our primitive data types.

So, we will talk about these, the examples of the int, but in the next classes, we will explore all of them, and use them. And, one point is, when you think that you are using these things, you will automatically come to the mark, and you will use these things very well. Now, we will practice the int data types with the help of code. So, what we will do is, we will make two variables.

First, the integer type of the int type, which we will store in the value, the second type of the int type, we will store the value, 25. So, we have stored the value, now, what we want? We want to make a third variable, the int type, which we will store in some, we will do A plus B. So, the match is also called A plus B here.

If we want to print it, then, we will print it out, and then, we will print it out. See what output is coming out? So, the output is coming out for us, we have called it, that is 35, that is 10 plus 25. Similarly, if we write it here, we will write a comment out, now, if we have already discussed the comments, we will write the comments in the code, which we do not want to execute.

The compiler that we ignore, if we do not want to ignore, we will print it out. So, we will not get error, but if we print it out in the upper line, then, we will get a red line. We write the comments in the comments, which we do not want to include in our code. If we take a difference here, that is minus, then, we will do B minus A, and we want to print it out.

So, we will run the code, so, we have print it out for us, 15, that is 25 minus 10. So, on the variables, we have made different variables in the code, and we will write different operations, so, the value will be here, and if we talk about the value, then, we will do the control, and if we come back to our initial statement, which was this, we had all taken out A and B, so, once we analyze, what is the meaning of taking out the value, what is the meaning of taking out the value, what is the meaning of taking out the value, that here int A is equal to 10, we will create a memory location, which we have stored in the 10, a memory location will be created, which we have stored in the 25, so, we have opposite the values, now, A plus B is when, that is, 10 plus 25 is when, so, the answer is, 35, which we have stored, is a type location, which we have given, now, some is equal to 35, so, here, some name will be more variable, in the memory, which we have stored, we will have 35, so, this way, the operation will be performed, A and B, and finally, we have, the new variable created in the memory, which has the value stored in it, 35, so, the different calculations, we have to assign a value to the other, or add, or multiply, all these things are happening in our code, and some of the memories are happening in this way, now, after this, if we multiply, then, let us comment this out, and, once we make a variable, multiply, we will write, A, B, now, in maths, A, B, we write, that, A, B, but, as it is not in Java, this portion is read, as it is in Java, you have to multiply, it will have to be given, so, you will multiply, then, that will be correct, you can print, your multiplication output, and, you will multiply, 250, now, multiply, and, then, divide, quotient, many operators, who can write, on variables, for different data types, now, in these sections, we will discuss, when, we are reading, when, we are discussing, type casting, so, we are going to advance, so, in this way, we have defined our variables, now, after that, we will talk about, ques, so, on data types, which we will solve, we have a question, we have to calculate, A into B divided by A minus B, A value, DdA10, B value, DdA5, now, we will write, you have to write, 11, 12 types, but, when we do, in this way, in a way, we are shifting, in our coding system, we are also looking at the code, we are also able to explore, so, we have a logical connection, so, we have a question, we have two options, which is correct, we will be giving, now, first of all, we calculate, 10 into 5 divided by 10 minus 5, this answer should be, 50 divided by 5, 10, now, we will see, both the options, whether the answer is 10 or not, first, we will see, first, we have written, 10 multiplied by 5, divided by 10 minus 5, now, in the state, we do not have to go into, the answer is not going into, the answer is Maths, the priority of Java is, the first priority, is, multiply, then, the operator of a module, which is discussed in the discussion, basically, from this operator, we are taking the remainder, this is the priority of these 3, we have to remember these things, now, we have remembered, after that, we will calculate this thing, how we will do it? Now, if we calculate, the left two right, we will also multiply, 10 is 50, divided by 10 minus 5, this is the problem, then, we will multiply, 10 minus 5, not 50 divided by 10, 5 minus 5, that is, 0, the first option, the answer, is 0, we will calculate, what will happen to us? we will have parenthesis, 10 into 5, divided by 10 minus 5, so, first, the value of the solve, the parenthesis is, 10 into 5 is 50, divided by 10 minus 5 is, 5, 10, now, from this way, we have 10, and suppose it is just enough, four points, then, we have 26, 128 inh we have 14, we have 15 points.

The oldest is graduallyHHHH undergoes change proper as they do not have use of the Ready to Control proper performed forms their basic fundamentals Fate or how the current type conversions value the keywordsacı the answer to these questions is B option now let's discuss the most important topics on the topics are the daher dermatologist이랑 CDC reopen with health 찍콕 Fine Institute தép деся VOICE 다음 하� SE hmne import kia hai Java dot utl nam ka ek package package kar na matlab vaha par vata rakhod li kha huwa jis khod ko hm apne khod ke anthar use kare huyomne yeh amne nidis kis kia tha pishle video meh abh isk chis ko ispagage ko amne import kare li hai yeh amne import kia meh scanner class abh isklaas ke anthar amne pas kare li hai system dot in to jis kare ke sa output ke li use kata hai system dot out input ke li use kata hai system dot in ihani hmari consol se hmari terminal se hmari input window se hmari input ko lailia hai abh input ko laili ke li baad hmari ose kahi pa store ga rana badae ka maan le te ahami input lena hai kisi ka name tu niya haapad defying kareng ke variable string string meh haapad sani wala hai name name ko hm ko chis therike zilenge sc dot next ihani jeh jo scanner ka hmari object bnaye hai scanner class ka ismek function hai next isneks function ki helpsi haam input ko laili baalie hai yeh input aayga aur amne gaa karengi isi input ko ham print karva dine ihani name ko ham print karva dine tu isko run karte hai kode ko seh upa lea aath hai troda sa kode ko chap ran karengi tu niya haapad haameh apna input pass karena padi haam input pass karte hai to ni haameh ne enter kia to haameh re le kia haa sabse beli usne hmari input liya fir usi input ko output karekhe dhkha ria aur exit karekhe kode se to scanner class ka amne object bnaye vaha se haameh ne input liya sc dot next karekhe fir usi input ko ham print karva dia abhe khasch chis therike nneks tse hei ihani next haameh ne input liya yeh aabar agar am dhubara haapne nam ko integrara nhaa chahi ushe karva tain pari aah par pura nam pas karte haam pura nam ham ne pas kia tekin hameh paris print sif fist word haa asa kye haa kye ki jabbi haam next function use karte to haameh hei token leita hai abh sentence kye karekhe maa in ayin minstoni start to haameh hai hai hai hai hai hai hai hai hai hai hai hai hai hai in mein haar ek single word ek single token haa agar abh next function ko use karene to haameh hei single word haa nye eit token haa hai agar abh ko puri line ko input le na hain hei yeh aapar haameh use kanaa podega function next line jabh haam next line leita ran karin kye haapne kode me tu kye haa hova yeh aapar haam liekte hain pura nam hei haa haa sbar haameh lei aap pura nam print haa hova put mein hei aani next line ko use kane se haa haapar haa haapar puri line input haa haa apu hsi teriki seye jese next and next line haa hote hai waiseh scanad klas ke aar bi baat saar i funcions haa hei aashans ke anndar aajat hai haa our next int next int use hote hai integer type ko input le na kye uske lawa aajat hai next float next float hote hai floating type ke intige floating type ke numbers ko le na kye floating type aani jese mein haapar desimil aajat hai to uske teriki ki nambar agar abh ko input le na hai to unko input kane ke le aapar next float use hote hai uske teriki se next double next long aise bahat saar e aapke types jo hai wo aajat hai jane ko aap input le saak te aapne kode me abh input ki haaapne baat kali ispara abh question kar le te hai aur jitne bhi kansit saam na aajat seekhe hai unko toodha saar eaahis kar le te hai to saat me haaapne meme bhi dhal diya jeshayat kaafi students ko relatable lagra ho jawa pati hoi abh bat kali te ing question ki to haaapne de le na hai do variable user se aand bhi aur amme print kar na hai umka sam to kuch ish tari ke ka kode ho kaaapne haaapne hom scanad klas baanaray humge a aur bhi ko input le rei humge uske baad sum naam ka ek variable maan hainke jeshaye a plus bhi kar deinke aand finally print kar vaadine apne sum ki value ko toom dhik paare kuch chaar paa shlainu ka hom kode like hei ki jesh kode se haa haaapne question ko solve karne wale hai to kode ko hagaar dekhe to sabse bhi le baanay humge haapne scanner object scanner object ko haaapne baanay humge iske baat kyaa kareinke input lehleinke a aur bhi to int a jo hojahe ka hojahe ka sc dot next int haapne abhi deskis kyaa tha ki next int function inti ja taik ki values ko input lene ke le use ho taik uske baad int b bo bhi next int se to do inti jaa values ko mne input lehlea haapne kreeeit kareinke tisra variable jesh ka naam hai sam to int sum ki value hojahe a plus b toom ne a ko input lehlea scanner object se bko input lehlea scanner object onhobش say am ayin ray mit ot india uth pud badav named k rounds apna mon теперь gesti proces oats opts تو ہم نے وہاں پر اس طریقے سے double codes نہیں نہ لے تھے ایسا کیوں ما ایک بار اسコード کو run کر کے دیکھنے کہ double codes دالیں گے تو کیا ہوگا اگر ہم اسコード کیاں دouble codes دالیں گے تو معانلیتے ہیں ای ہم نے enter kea 10 b enter kea 5 ہمارے لے print کیا ہوا sum print ogea sum print hone ka madla bagu دouble codes keaں دا جو چیز لک دو گے وہ vesi ki vesi print hohaayi پر ہمیں یہ والا sum print nai ka raanah ہمیں دو nou values ka sum print ka raanah تو اس کے لئے ہمیں double codes use nai ka na seidha ka seidha اپنے vayriyable ko in parenthesis keaender lik dainai تو ہمیں پر sum ne print orao ga sum keaender stod value print ho reyogi memeri ki اس کو دبارa raan krtaan دبارa ham aapna input pass krtaan which is 10 and 5 اور اب ہمارے لے print hohaayi 15 put 10 and 5 ka sum ہمارے لے print hoha yaa ہمیںہ کنسے پیوس کر لیا input ka vayriyable ka data type ka اس کے ساتھ ساتھ ہمارے output ka تو آج ہمیں چار جو بیسک فندمنٹلز off programming ہوتے ہیں فندمنٹلز جاوہ ہوتے ہیں انہیں دسکس کر لیا ہے اس کے بعد اور بی چیزیں دسکس کریں گے تو ایک بار ہم جاوہ کو completely cover کر لیں اس کے بعد start کریں گے data structures and algorithms تو آئے hohaayi hohaayi ki جو کلاس hohaayi واب جاکہ ریفر کر سکتے ہیں اناوٹز میں جو mentioned questions انہیں ہمیں practس کرنا in next class پہلے ملدہ in next video میں چلدن keep learning and keep exploring

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Courses

FAQs

Course Hive
Download CourseHive
Keep learning anywhere