write a program in java with the following criteria
class name: moviemagic
void main()
int a
String Movie
rating is 1 to 3. flop
rating is 3 to 5. hit
Answers
import java.util.*;
public class moviemagic
{
public static void main(String args[])
{
Scanner in=new Scanner(System.in);
int a;
string movie;
System.out.println("Enter the movie name & rate it between 1 to 5");
a=in.nextInt();
movie=in.nextLine();
if(a>0)&&(a<=3)
{
System.out.println(movie+" is flop");
}
if(a>3)&&(a<=5)
{
System.out.println(movie+"is HIT");
}
else
{
System.out.println("RATING is INVALID");
}
}
}
PlZ run it on computer but before mark my answer as brainiest plz plz
Answer:
Parameters used in First Java Program. Let's see what is the meaning of class, public, static, void, main, String[], System.out.println(). class keyword is used to declare a class in java. ... static is a keyword. If we declare any method as static, it is known as the static method.