[JAVA] Beginner: I get an error on line 30. I don't know where to fix it.

In the following statement, I get an error on line 30. Could you please tell me who knows?

import java.util.Scanner;

class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in);

System.out.println ("name:"); String firstName = scanner.next(); System.out.println ("Last Name:"); String lastName = scanner.next(); System.out.println ("age:"); int age = scanner.nextInt(); System.out.println ("height (m):"); double height = scanner.nextDouble(); System.out.println ("Weight (kg):"); double weight = scanner.nextDouble();

sub(firstName,lastName,age,height,weight);

}

public static void sub(String firstName, String lastName, int age, double height, double weight) { System.out.println ("Name is" + firstName + "" + lastName + "); System.out.println ("Age is" + age + "years"); if (age> = 20) {System.out.println ("adult");} else {System.out.println ("Minor");} System.out.println ("height is" + height + "m"); System.out.println ("Weight is" + weight + "kg"); System.out.println ("BMI is" + Math.round (bmi (weight, height)) + ""); ☆ if (isHealthy (bmi)) {System.out.println ("healthy");} else {System.out.println ("not healthy");}

}

public static double bmi(double weight, double height){ return weight / height / height; }

public static boolean isHealthy(double bmi){ return bmi>=18.5&&bmi<25;

}

}

Recommended Posts

Beginner: I get an error on line 30. I don't know where to fix it.
[Java beginner] Command line arguments ... I don't know ~
I found no way to get the error code when I received an exception on Android
I can deploy to heroku, but I get an error and can't open it [Cause: MySQL]
I can deploy Heroku, but I get an error and can't open it
When I tried to start GlassFish, I got an internal error while "Publishing to GlassFish 4.0 on localhost ...". What to do when it becomes
What to do if you get an error on heroku rake db: migrate
I get an error when adding a dependency
I don't know, so I'm going to write a list (you don't have to read it)
I have a question. I get an error when playing a video in Listview on android.
I want to use NetBeans on Mac → I can use it!
[Rails] I don't know how to use the model ...
I introduced Docker to Rails 6, so I summarized it (beginner)
firewalld went wrong, so I managed to fix it.
I want to get along with Map [Java beginner]
[Java beginner] Difference between length and length () ~ I don't know ~
I tried to build an environment using Docker (beginner)
I want to use Java Applet easily on the command line without using an IDE
11 items I don't know if it's good to know about JAVA
I tried adding a separator line to TabLayout on Android