Logo video2dn
  • Сохранить видео с ютуба
  • Категории
    • Музыка
    • Кино и Анимация
    • Автомобили
    • Животные
    • Спорт
    • Путешествия
    • Игры
    • Люди и Блоги
    • Юмор
    • Развлечения
    • Новости и Политика
    • Howto и Стиль
    • Diy своими руками
    • Образование
    • Наука и Технологии
    • Некоммерческие Организации
  • О сайте

Скачать или смотреть Java - Day 71 (in Telugu) - difference between dynamic binding and static binding

  • PoornaChandra Karyampudi (ComPro)
  • 2023-01-06
  • 308
Java - Day 71 (in Telugu) - difference between dynamic binding and static binding
programexplainexplanationpoornapoornachandracomprouppalhyderabadc languagec-languagec++javacppdata structuresweb technologiesclass roomwhite boarddetaildetailedline by linehtmlcssjavascriptlivescreen capture
  • ok logo

Скачать Java - Day 71 (in Telugu) - difference between dynamic binding and static binding бесплатно в качестве 4к (2к / 1080p)

У нас вы можете скачать бесплатно Java - Day 71 (in Telugu) - difference between dynamic binding and static binding или посмотреть видео с ютуба в максимальном доступном качестве.

Для скачивания выберите вариант из формы ниже:

  • Информация по загрузке:

Cкачать музыку Java - Day 71 (in Telugu) - difference between dynamic binding and static binding бесплатно в формате MP3:

Если иконки загрузки не отобразились, ПОЖАЛУЙСТА, НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если у вас возникли трудности с загрузкой, пожалуйста, свяжитесь с нами по контактам, указанным в нижней части страницы.
Спасибо за использование сервиса video2dn.com

Описание к видео Java - Day 71 (in Telugu) - difference between dynamic binding and static binding

/*
difference between static binding and dynamic binding
*/

import java.util.*;

interface Shape{
void input();
void area();
void sides();
}
class Rect implements Shape{
int len,bre;
public void input(){ Scanner sc1 = new Scanner(System.in); System.out.print("enter Rect length:"); len=sc1.nextInt(); System.out.print("enter Rect breadth:");bre=sc1.nextInt();}
public void area(){ System.out.println("Rect area:"+(len*bre)); }
public void sides(){ System.out.println("\nRect sides: 4"); }
}
class Triangle implements Shape{
int base,ht;
public void input(){ Scanner sc2 = new Scanner(System.in); System.out.print("enter triangle base:"); base=sc2.nextInt(); System.out.print("enter triangle height:");ht=sc2.nextInt();}
public void area(){ System.out.println("Triangle area:"+(base*ht/2)); }
public void sides(){ System.out.println("\nTriangle sides: 3"); }
}
class Circle implements Shape{
int rad;
public void input(){ Scanner sc4 = new Scanner(System.in); System.out.print("enter Circle radius:"); rad=sc4.nextInt(); }
public void area(){ System.out.println("Circle area:"+((22/7.0)*(rad*rad))); }
public void sides(){ System.out.println("\nCircle sides: 0"); }
}
public class DynamicBind{
public static void main(String arg[]){
Scanner sc3 = new Scanner(System.in);
System.out.println("1.Rect");
System.out.println("2.Triangle");
System.out.println("3.Circle");
System.out.print("Choose the shape (1/2/3):");
int type = sc3.nextInt();
Shape s = null;

if(type==1)
s = new Rect();
else if(type==2)
s = new Triangle();
else if(type==3)
s = new Circle();
else{
System.out.println("\ninvalid option");
System.exit(0);
}

s.input(); // dynamic binding
s.sides(); // dynamic binding: taking decision at runtime about linking/binding/relating between "method call" & "method definition"
s.area(); // dynamic binding
}
}
/*
dynamic binding is possible only when parent child relation exists.
dynamic binding is possible only when overrding involves.

solution1:
if(type==1)
s = new Rect();
else if(type==2)
s = new Triangle();
else // removed if
s = new Circle();

s.input();
s.sides();
s.area();

solution2:
if(type==1)
s = new Rect();
else if(type==2)
s = new Triangle();
else if(type==3)
s = new Circle();

if(s!=null){
s.input();
s.sides();
s.area();
}

solution3:
if(type==1)
s = new Rect();
else if(type==2)
s = new Triangle();
else if(type==3)
s = new Circle();
else
return;

s.input();
s.sides();
s.area();

solution4:
throw an exception and handle it properly.

BackEndDev
-------------
Logic Development (keyword, operator, constant, identifier, statement, token,
if-else, while/for, switch, arguments, array, function/method)
Core Java (class, object, inheritance, exception handling, multithreading, collections, other packages in Java, IO, AWT/Swing/JavaFx)

JDBC
Hibernate
JPA

Servlets/JSP
Spring
SpringBoot
MicroServices



FrontEndDev
-------------
HTML,CSS,JavaScript
AngularJs/NodeJs



FullStackDeveloper
--------------------
BackEndDev + FrontEndDev = FullStackDeveloper


Cloud
------
AWS/GCP/Azure



*/

Комментарии

Информация по комментариям в разработке

Похожие видео

  • О нас
  • Контакты
  • Отказ от ответственности - Disclaimer
  • Условия использования сайта - TOS
  • Политика конфиденциальности

video2dn Copyright © 2023 - 2025

Контакты для правообладателей [email protected]