Java Lesson 2 - Variables - using int & double

preview_player
Показать описание
Java Lesson 2 - intro to variables
I DID NOT CREATE KODING.COM, I AM ONLY USING IT TO SHOW YOU GUYS HOW TO CODE
Hey guys, if you don't feel like watching the video, then I can explain to the steps of creating variables here:
Steps
3. type
public class variables {
public static void main(String args[]) {
4. Then you are going to type in a variable.
5. In my video, I created a variable called age and set it equal to 20
age = 20;
6. I showed the age = 20; wouldn't work by itself, so I explained that you need to put either an int or double on the beginning of your variables.
7. I printed out the variable in the terminal below
9. The terminal successfully printed out 20.
10. When I changed int age = 20; to double age = 20; The terminal printed out 20.0
11. The reason why the terminal printed out 20.0 is because a double turns the number into a decimal rather than an integer.
12. Well that's all for today guys! See you next time!
Рекомендации по теме
Комментарии
Автор

Thanks for your Videos Sir. It was a nice experience.

Nasim_Hamid
Автор

Multiply two polynomials P and Q and place the result in polynomial Q itself, Using JAVA.

For example,

Input Polynomial P: ( x 4 + 2 x 3 y + 3 x 2 y 2 + 4 x y 3 + 5 y 4 )
Input Polynomial Q: ( x 2 - 2 xy + y 2 )
Multiplication Result: ( x 6 - 6 xy 5 + 5 y 6 ) to be placed in polynomial Q itself.


Can you please give me the Solution for the above Question

Nasim_Hamid
visit shbcf.ru