0

Hey guys, im new to programming, just took my first course in university. I'm currently trying to program a calculator that does multiplication, but its giving me this error:
C:UsersKarimDocumentsKarim.java:14: error: missing method body, or declare abstract
public static void main(String[] args);

Anyone know how to fix it? :(

import java.util.Scanner;
public class Karim {



        public static void main(String[] args);
        {


        Scanner input = new Scanner(System.in);
            int a = 0;
            int b = 0;
            int product = 1;

        System.out.println("Please enter first number");
            a = input.nextInt();

        System.out.println("Please enter second number");
            b = input.nextInt();

        product = a*b;

        System.out.println("The product is: " + product);      
    }
2
Contributors
1
Reply
2
Views
5 Years
Discussion Span
Last Post by JamesCherrill
1

Line 56 - has an incorrect ; - just delete it

 public static void main(String[] args) {
    // method body
 }

Edited by JamesCherrill

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.