✔ Relationship Between Java’s Classes, Objects, and Methods | (Video 13)
Are you interested in Java and want to get an introduction to Object Oriented Programming (OOP)? For starters, we must know an object is a template of a class. I believe this video will thoroughly help a beginner understand the difference between an object and object reference. Plus, learn how to return values from a method and pass values from arguments to parameters. Here’s the video timestamp:
✔ Introduction = 0:15
✔ Objects = 7:49
✔ Return Values = 15:37
✔ Pass Values = 19:18
► Download Presentation and Java Code = https://www.rexjones2.com/java-classes-objects-methods-relationship/
► Free Selenium PDF Book: https://www.rexjones2.com/book-selenium-4-beginners/
► Free Java PDF Book: https://www.rexjones2.com/book-part-1-core-java/
► All Paperback & eBooks: http://tinyurl.com/Rex-Allen-Jones-Books
► Transcript
Hello Everybody, Welcome To Selenium 4 Beginners. My name is Rex Allen Jones II. We are going to discuss the Relationship Between Java’s Classes, Objects, and Methods.
In this video’s Tutorial Plan, I will Introduce Classes, Objects, and Methods, discuss the Concepts of Classes, Objects, and Methods, followed by a demo of Classes, Objects, and Methods.
If you are interested, you can download this presentation and code that I will demo in this video at https://tinyurl.com/Java-Classes-Objects-Methods
First, I am going to Introduce Classes, Objects, and Methods. Starting with a class. Class is created using the reserved word class. In this syntax, our reserved word is written in purple. ClassName written in white identifies the name of the class. Java is built upon classes because a class defines the nature of an object. Therefore, a class forms the basis of Object-Oriented Programming which is known as OOP.
Within a class, we can create objects, declare variables, and we can also declare methods. A Method’s Body can include objects, variables, and all kind of statements that perform an action.
There’s 2 ways to create an object. Both ways require the Class Name. The first syntax shows ClassName and an Object Reference Variable on one line then the Object Reference Variable equal new ClassName on the second line.
A shortcut of this same syntax is placing both lines on one line. We see the ClassName followed by the Object Reference Variable equal to new ClassName. Notice there are 2 ClassNames in both syntaxes. The first ClassName help declares a reference to the object while the second ClassName assist with allocating the new object.
In a good written Java program, a method performs only one task. The return type determines the type of data returned from the method. If no data is returned from the method then we use void. However, if data is returned from the method then the Return Type will be a Non-Object or Object Data Type.
All methods have a name and the name is used to call the method. The parameter list is 1 or more parameters that receive arguments. An argument is a value passed to the method. The parameters are declared just like a variable. 2 or more parameters are separated by a comma. Last but not least, the Method’s Body is where write our code.
Now, let’s discuss the concept of Classes, Objects, and Methods. With this illustration, Car is our class. By definition, according to dictionary.com, a class is a number of persons or things regarded as forming a group by reason of common attributes. Therefore, a class contains a group of common attributes. Our car class will form a group of new cars.
That group of new cars with common attributes are called objects. We have 3 new car objects. Each of these new cars is a template of the Car class. That means, objects have the same attributes as their class. In Java, we call those attributes; members. A member can be a variable or method.
There is a difference between an object and an object reference variable. New Car, New Car, and New Car are the objects while coupe is an object reference variable. We can say object reference for short. Coupe is an object reference variable because it refers to the first New Car object. The same goes for minivan and sedan which refers to their object. In our industry, an object reference variable is mistakenly sometimes called an object. I can admit that I am guilty of calling an object reference; an object although they are different.
If you wanted to buy a new car, what’s one of the main things you want to know. How much does it cost? We would use a method to calculate the cost. To calculate cost, we need to add the price and tax. Price and tax are data that’s manipulated by the method.
Let’s take another look at the same concept of Classes, Objects, and Methods but in a different way. On the left side, we have a Class and Method. On the right, we have Objects. Know what, I am going to bypass discussing Classes, Objects and Methods in this presentation slide but discuss them later in our demo.
#SeleniumTraining #SeleniumAutomation #BeginnerSeleniumTutorials #SeleniumWebDriver
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «✔ Relationship Between Java’s Classes, Objects, and Methods | (Video 13)», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.