Hi I am just starting to learn about java.I am trying to calculate BMI of an individual using the JOptionPane.showInputDialog method who I am asking to enter 4 things first name,last name,height in inches and weight in pounds. I want to show the BMI using JOptionPane.showMessageDialog method showing their full name and BMI.What am I doing wrong ?
import javax.swing.JOptionPane; public class P1 { public static void main(String[] args) { String FirstName = JOptionPane.showInputDialog("Enter your First name"); String LastName = JOptionPane.showInputDialog("Enter your Last name"); double height = JOptionPane.showInputDialog("Enter your height in inches"); int inches = Integer.parseInt(height); int metre= inches*0.0254; double weight =JOptionPane.showInputDialog("Enter your weight in pounds"); int pounds = Integer.parseInt(weight); int kilo= pounds/2.2; String response= "kilo"*sqrt"metre" +"FirstName"+"Lastname" JOptionPane.showMessageDialog(null, response); } }