DEV Community

Payilagam
Payilagam

Posted on

1

test

public class Mobile
{
public static void main(String[] args)
{
Mobile whatsapp= new Mobile(); //object creation//new allocates memory
whatsapp.openchat(); //method calling statemnt
Mobile youtube=new Mobile();
//object creation //new allocates memory
youtube.watchvedio(); //method calling statemnt
}
public void openchat() //method signature
{
System.out.println("open chat and type hi"); //method defination//body
}
public void watchvedio() //method signature
{
System.out.println("open and watch vedio in youtube"); //method defination//body
}
}
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay