1.create a class called TV
2.Have below method in it.
public void watch()
{
System.out.println("Watching TV");
}
Create another class called Viewer with main method.
Inside main method, create an instance for TV class. (Instance - object)
Using created instance, call watch() method.
public class Tv {
public static void main(String[] args) {
// TODO Auto-generated method stub
Tv LG = new Tv();
LG.Watch();
}
public void Watch ()
{
System.out.println("watching tv");
}
}
public class Viewer {
public static void main(String[] args) {
// TODO Auto-generated method stub
Tv LG = new Tv();
LG.Watch();}
}
out put --- watching tv
}
Top comments (5)
Yacine TV v3 is a popular streaming app that offers live sports, movies, and TV channels, especially catering to football fans. With an easy-to-use interface and smooth streaming, it provides access to various international and Arabic channels. The latest version, Yacine TV v3, enhances performance with better stability and fewer ads, making it a great choice for uninterrupted entertainment on Android devices.
My family loves Magis TV en Fire Stick v5.0.2—activate developer options, install Downloader, enter code 730116 for APK, update OTA inside app. Free live TV channels, premium VOD with trial, HD/4K streaming, EPG schedules, and Chromecast-like casting. Use VPN for safety—turns your Fire Stick into a full Smart TV powerhouse!
PPcineAPK is an Android app that provides access to a wide range of movies and TV shows for free. It features content in multiple languages, including the latest releases and classic favorites. With a user-friendly interface and regular updates, it’s a popular choice for streaming on the go.
Some comments may only be visible to logged-in visitors. Sign in to view all comments.