DEV Community

Pavitra Aravind
Pavitra Aravind

Posted on

1

Today class

class Movies
{
static String language = "Tamil";
static boolean new_movie = true;
String hero, heroine, comedian, director, villain, music_director;
int no_of_days;
static int ticket_price;
boolean hit;

public static void main(String[] args)
{
Movies amaran = new Movies();
amaran.hero = "sivakarthikeyan";
amaran.heroine = "sai pallavi";
amaran.music_director = "gvprakash";
amaran.ticket_price = 110;
amaran.no_of_days = 50;
amaran.hit = true;
System.out.println(amaran.hero);
System.out.println(amaran.director);
System.out.println(amaran.comedian);
System.out.println(amaran.villain);

Movies leo = new Movies();
leo.hero = "vijay";
leo.heroine = "trisha";
leo.director = "lokesh";
leo.music_director = "anirudh";
leo.villain = "arjun";
leo.hit = false;
System.out.println(leo.hero);
System.out.println(leo.hit);
System.out.println(leo.no_of_days);

amaran.watch();

}
public void watch()
{
System.out.println("Inside watch() method " + hero);
}

}

Output:

Image description

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post