filmov
tv
Java Tutorial #36 - Anonymous Class in Java Programming

Показать описание
Java Tutorial #36 - Anonymous Class in Java Programming
In this video by Programming for Beginners we will learn Anonymous Class in Java Programming, using Java Tutorial videos.
In Java, a class can contain another class known as nested class. It's possible to create a nested class without giving any name.
A nested class that doesn't have any name is known as an anonymous class.
An anonymous class must be defined inside another class. Hence, it is also known as an anonymous inner class.
class Polygon {
public void display() {
}
}
class AnonymousDemo {
public void createClass() {
// creation of anonymous class extending class Polygon
Polygon p1 = new Polygon() {
public void display() {
}
};
}
}
class Main {
public static void main(String[] args) {
AnonymousDemo an = new AnonymousDemo();
}
}
==========
We can learn Java Programming language to make web applications or mobile applications for android phones and several other applications for windows, Mac OS and Unix operating systems. Also we can make android applications using Java programming. The concepts covered will be related to basic java and core java that will help you in your next interview questions. You can use any version of Java but all concepts will be same for all java versions. I will be using Java SE 8.
Java is a high-level programming language. Java runs on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX.
Java is a MUST for students and working professionals to become a great Software Engineer specially when they are working in Software Development Domain.
Java Tutorial Playlist:
Java JDK:
Eclipse IDE:
YouTube Gears:
#JavaTutorial #JavaForBeginners #Programming #Java
============================
LIKE | SHARE | COMMENT | SUBSCRIBE
Thanks for watching :)
In this video by Programming for Beginners we will learn Anonymous Class in Java Programming, using Java Tutorial videos.
In Java, a class can contain another class known as nested class. It's possible to create a nested class without giving any name.
A nested class that doesn't have any name is known as an anonymous class.
An anonymous class must be defined inside another class. Hence, it is also known as an anonymous inner class.
class Polygon {
public void display() {
}
}
class AnonymousDemo {
public void createClass() {
// creation of anonymous class extending class Polygon
Polygon p1 = new Polygon() {
public void display() {
}
};
}
}
class Main {
public static void main(String[] args) {
AnonymousDemo an = new AnonymousDemo();
}
}
==========
We can learn Java Programming language to make web applications or mobile applications for android phones and several other applications for windows, Mac OS and Unix operating systems. Also we can make android applications using Java programming. The concepts covered will be related to basic java and core java that will help you in your next interview questions. You can use any version of Java but all concepts will be same for all java versions. I will be using Java SE 8.
Java is a high-level programming language. Java runs on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX.
Java is a MUST for students and working professionals to become a great Software Engineer specially when they are working in Software Development Domain.
Java Tutorial Playlist:
Java JDK:
Eclipse IDE:
YouTube Gears:
#JavaTutorial #JavaForBeginners #Programming #Java
============================
LIKE | SHARE | COMMENT | SUBSCRIBE
Thanks for watching :)
Комментарии