RUVIDEO
Поделитесь видео 🙏

Types of Variable in Java #3 смотреть онлайн

📁 Лайфстайл 👁️ 16 📅 05.12.2023

Hey, Guys in this vedio we will be learning differernt type of Variables in java

Plz, subcribe the channel if u are new.......

Click Here to Subcribe : https://www.youtube.com/channel/UC2Fz...

Click Here to Access the Playlist : https://youtube.com/playlist?list=PLc...

Code of the Video:

public class local_variable
{
/*
Types of variables

There are three types of variables in Java:
* Local Variables
* Instance Variables
* Static Variables

*/

// Local Variables :

/*
* A variable defined within a block or method or constructor is called local variable.
*
* The scope of these variables exists only within the block in which the variable is declared.
* i.e. we can access these variable only within that block.
*/

public static void main(String [] args){
// Local Variable
int a = 10;

//Printing the Local Variables
System.out.println(a);

// Creating the Object of Class
local_variable obj = new local_variable();
obj.print();
}

public void print(){
// Local Variable
int b = 100;
System.out.println(b);
}

public local_variable(){
// Local Variable
int c = 1000;
System.out.println(c);
}
}

public class instance
{
/*
* Instance Variables: Instance variables are non-static variables and are declared in a class
outside any method,constructor or block.

As instance variables are declared in a class,
these variables are created when an object of the class is created and destroyed when the object is destroyed.

Instance Variable can be accessed only by creating objects.
*/

// Instance Variable
int a = 100;

public static void main(String [] args){
// Object Creation
instance obj = new instance();
int ans = obj.a;
System.out.println(ans);

}
}

public class _static_
{
/*
* Static variables are also known as Class variables.
These variables are declared similarly as instance variables,
the difference is that static variables are declared using
the static keyword within a class outside any method constructor or block.

Static variables are created at the start of program execution and
destroyed automatically when execution ends.

If we access the static variable without the class name, Compiler will automatically append the class name.
*/

// static variable
static int a1 = 1000;
static String a2 = "Subcribe";

public static void main(String [] args){
int result1 = a1;
String result2 = a2;
System.out.println(result1 + " " + result2);
}
}

Music Credit Goes to : https://youtu.be/Srqs4CitU2U

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Types of Variable in Java #3» бесплатно и без регистрации, вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.