Java Abstract Classes | Java Course in Tamil | Logic First Tamil

preview_player
Показать описание
Java Playlist,

C Interview program playlist,

C programming in one video,

C programming playlist

C++ Playlist link

English channel link,
Рекомендации по теме
Комментарии
Автор

Your java playlist is one of the best java tutorial in youtube

_cse_jananir
Автор

Unga voice super aa iruku 😍😍 also explaining slang also just awesome 😎

virat_pattt
Автор

your voice so cute and explain slag also very nice and easy to understand very well thank you class mam😍😃

singertamil
Автор

14:20
define panniye aganum nu nammala nga

aravindkumar
Автор

Please add all the codes in description, it will be easy for us to revise before the interview day

spooja
Автор

abstract class shape{
abstract void area(int a, int b);
}
class square extends shape{
public void area(int a, int b){
System.out.println(a*b);
}
}
class triangle extends shape{
public void area(int a, int b){
System.out.println(a*b/2);
}
}
class Main
{
public static void main(String[] args) {
square s=new square();
triangle t= new triangle();
s.area(10, 20);
t.area(10, 20);
}
}

gowthamselvaraj
Автор

thank you so explanation is very clear for all the topics.

vigneshrp
Автор

12:11 line 5 la abstract void ah //committed pannirunga abstract ah remove pannitu verum void method kodukalamay.??

kajamoideen
Автор

object names m1 and m, m2, m3, m4 nu kodukama unique names koduthu explain panni innum nalla puriyum

nimalj
Автор

Mam, I have an one doubt? What's the difference between ( Member m1 = new Student(); and Student s1 = new Student(); ) in the time of object initialization?

kannanb
Автор

Solution for the exercise::::

import java.util.*;
abstract class Common{
int length, breadth;
abstract int area();
}
class Square extends Common{
int length;
Square(int length){
this.length=length;
}
int area(){
return length*4;
}
}
class Triangle extends Common{
int length, breadth, height;
Triangle(int length, int breadth, int height){
this.length=length;
this.breadth=breadth;
this.height=height;
}
int area(){
int a=breadth*height;
return a/2;
}
}
public class Main
{
public static void main(String[] args) {
ArrayList<Common>c = new ArrayList<Common>();
c.add(new Square(4));
c.add(new Triangle(2, 4, 4));
for(Common i:c){
System.out.println(i.area());
}
}
}

_NAGASUBRAMANIANS
Автор

Mam Your Teaching is Very easy to learn ....Please do the playlist for DBMS and SQL

ananthkumark
Автор

Mam can you please add the code in the description or in the pinned comments so that we can revise easily before exam??

aazhinisenthilkumaran
Автор

Mam, abstract methodla irukura concrete methods and variablesa eppadi access pandradhu.derived classla Override pannama access panna mudiyuma?

baskarj
Автор

Mam member class ku array objects create panum pothu

new Member [ ]; nu podurom.


New keyword abstract class ku use panna kudathu sonnigalay mam.

elements kaana index references create pandrathunala athu allow pannuthaanga maa

New Member( );
Ipdi podum pothu heap la oru object create pandrathunaala allow pannaliya mam.

Correct taanu sollunga mam

sivamsivam
Автор

mam can you saggest some best book in c++ and java

shortboy
Автор

Mam..neenga last ah kudukura programs ku ans enga iruku??

.poorwinsankar.r.k
Автор

Mam first u said for abstract u can't create object but after very mins u create array object for abstraction mam.so my question if array means i create for abstraction?? confuse mam

gokulnath
Автор

package Absract;


abstract class Shape
{
abstract void area(int n);
}

class Square extends Shape
{
void area(int n)
{
+ (n * 4));
}
}

class Triangle extends Shape
{
void area(int n)
{
+ (n * 3));
}
}

public class Exercise {

public static void main(String[] args) {

Shape[] s = new Shape[2];
s[0] = new Square();
s[1] = new Triangle();

for(Shape s1: s)
{
s1.area(4);
}

}

}

CARevanthkumar
Автор

Answer for the Question
// Shape
public abstract class Shape {
abstract void area();
}
class Square extends Shape {
private double side ;

public Square(double side){
this.side = side;
}
@Override
void area(){
double squareArea = side*side ;
System.out.println("Area of Square ="+squareArea);
}
}
class Triangle extends Shape {
private double height ;
private double base;

public Triangle(double height, double base){
this.height = height;
this.base = base;
}
@Override
void area() {
double triangleArea = 0.5 * base * height;
System.out.println("Area of Triangle ="+triangleArea);
}
}
//Main class
public class Main {
public static void main(String[] args) {
Square square = new Square(23);
Triangle triangle = new Triangle(20, 10);
// triangle.area();
// square.area();
Shape[] area = new Shape[3];
area[0]= new Square(10);
area[1]= new Triangle(20, 10);
area[2]= new Square(30);

for (int i = 0; i < area.length ; i++) {
area[i].area();
}
}
}

uzumakinaruto-yswp