Ramanjaneyulu Dayinaboyina
24, నవంబర్ 2024, ఆదివారం
23, నవంబర్ 2024, శనివారం
In Java, abstract class is declared with the abstract keyword. It may have both abstract and non-abstract methods(methods with bodies). An abstract is a Java modifier applicable for classes and methods in Java but not for Variables. In this article, we will learn the use of abstract classes in Java.
In Java, the following some important observations about abstract classes are as follows:
- An instance of an abstract class can not be created.
- Constructors are allowed.
- We can have an abstract class without any abstract method.
- There can be a final method in abstract class but any abstract method in class(abstract class) can not be declared as final or in simpler terms final method can not be abstract itself as it will yield an error: “Illegal combination of modifiers: abstract and final”
- We can define static methods in an abstract class
- We can use the abstract keyword for declaring top-level classes (Outer class) as well as inner classes as abstract
- If a class contains at least one abstract method then compulsory should declare a class as abstract
- If the Child class is unable to provide implementation to all abstract methods of the Parent class then we should declare that Child class as abstract so that the next level Child class should provide implementation to the remaining abstract method
import java.io.*;
abstract class Subject {
Subject() {
System.out.println("Learning Subject");
}
abstract void syllabus();
void Learn(){
System.out.println("Preparing Right Now!");
}
}
class IT extends Subject {
void syllabus(){
System.out.println("C , Java , C++");
}
}
class absdemo {
public static void main(String[] args) {
Subject x=new IT();
x.syllabus();
x.Learn();
}
}
15, నవంబర్ 2024, శుక్రవారం
13, నవంబర్ 2024, బుధవారం
1, నవంబర్ 2024, శుక్రవారం
KARMANYE WADIKARASHTE............... maphalesu kadachana🙏...................Your right is only in doing action (effort), never in the fruits (result) of action. Don’t be desirous of reward of deeds. You may not be attached to inaction either.
మీ చర్యలపై మీకు హక్కు ఉంది, ఫలాలపై ఎప్పుడూ ఉండదు
చర్య యొక్క ఫలాలు మీ ఉద్దేశ్యంగా ఉండనివ్వండి లేదా మీ అనుబంధం నిష్క్రియాత్మకంగా ఉండనివ్వండి 47 ||17, అక్టోబర్ 2024, గురువారం
Feeling Good..........written by michel, Memories of Matsuko 2005 ..a japanees movie sound tracks.....latest play david gandy
Birds flying high, you know how I feel
Sun in the sky, you know how I feel
Breeze driftin' on by, you know how I feel
It's a new dawn, it's a new day, it's a new life
For me
And I'm feeling good
I'm feeling good
Fish in the sea, you know how I feel
River running free, you know how I feel
Blossom on the tree, you know how I feel
It's a new dawn, it's a new day, it's a new life
For me
And I'm feeling good
Dragonfly out in the sun, you know what I mean, don't you know?
Butterflies all havin' fun, you know what I mean
Sleep in peace when day is done, that's what I mean
And this old world, is a new world, and a bold world
For me
For me
Stars when you shine, you know how I feel
Scent of the pine, you know how I feel
Oh, freedom is mine, and I know how I feel
It's a new dawn, it's a new day, it's a new life, huh
It's a new dawn, it's a new day, it's a new life
It's a new dawn, it's a new day, it's a new life
It's a new life for me
And I'm feeling good
I'm feeling good
I feel so good
I feel so good