Visual basic - simple beginner program question

I have a friend writing a entry level VB app but I do not know VB - can you correct the following code? Looks like a VERY simple calculator...

Andrea Cortez
 * CS123-0804A-04
 * Problem Solving and programming Concepts
 * Jeffrey Unger
 * Colorado Technical University Online
 * November 2, 2008
 */
package lab4;
import java.util.Scanner;

/**
 *
 * @author MandaPiggy
 */
public class Main {
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // int a, b, c, d, x;
        int n1, n2;
       
        Scanner keyboard = new Scanner (System.in);
        // This is the starting of the program//
        System.out.println("Please enter first number:");
        // This is the first step in the program//
        n1 = keyboard.nextInt();
        // This is how the program will read the first step//
        System.out.println("Choose a letter:");
       
        if (a = add) {
           then (n1 + n2 = x);
        }else if (b = subtract) {
           then (n1 - n2 = x);
        }else if (c = multiply) {        
           then (n1 * n2 = x);
        }else if (d = divide) {
           then (n1/n2 = x);
         class.lab4.Main();
       
        }
        System.out.println ("Enter second number:");
        n2 = keyboard.nextInt();
        System.out.println ("The total is" + (n1 + n2));  
       
    }
}
init:
deps-jar:
Compiling 1 source file to C:\Documents and Settings\MandaPiggy\My Documents\NetBeansProjects\Lab4\build\classes
C:\Documents and Settings\MandaPiggy\My Documents\NetBeansProjects\Lab4\src\lab4\Main.java:42: <identifier> expected
         class.lab4.Main();
C:\Documents and Settings\MandaPiggy\My Documents\NetBeansProjects\Lab4\src\lab4\Main.java:42: <identifier> expected
         class.lab4.Main();
C:\Documents and Settings\MandaPiggy\My Documents\NetBeansProjects\Lab4\src\lab4\Main.java:50: reached end of file while parsing
}
3 errors
BUILD FAILED (total time: 0 seconds)

Thanks!
Karl66Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

GrahamSkanRetiredCommented:
The main problem is that the code isn't VB.
It looks like Java. Or is could be JavaScript, C# or one of those languages with syntax derived from C.
0
vbsquickresponseCommented:
Do you want this program to rewritten in VB?  Looking at the code its looks like java code to me!

What add, substract, multiply means in the code? have u declare them somewhere or they are keywords?

        if (a = add) {
           then (n1 + n2 = x);
        }else if (b = subtract) {
           then (n1 - n2 = x);
        }else if (c = multiply) {        
           then (n1 * n2 = x);
        }else if (d = divide) {

error shown becz of them might be!
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.