Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

public class Main {
    public static void main(String[] argv) throws Exception {
        String age = "1";
        String height = "1.5";
        String weight = "5.9";

        int theAge = Integer.parseInt(age);
        float theHeight = Float.parseFloat(height);
        double theWeight = Double.parseDouble(weight);

        System.out.println("Age: " + theAge);
        System.out.println("Height: " + theHeight);
        System.out.println("Weight: " + theWeight);
    }
}