Hey this is initail level of codding... please read the java book.
For your reference i am attaching the code.. But please take care....
package com.java.main;
import com.java.main.RoomTwo;
public class RoomOne {
public static void main(String[] args) throws Exception {
RoomTwo r2 = new RoomTwo();
r2.roomDetail();
}
}
package com.java.main;
import javax.swing.JOptionPane;
public class RoomTwo {
public void roomDetail() throws Exception {
// Declaration of strings
String firstNumber;
String secondNumber;
int numberOne = 10;
int numberTwo = 20;
int finalAnswer = numberOne * numberTwo;
JOptionPane.showMessageDialog(null, "The area of the room is: "
+ finalAnswer + " sqaure feet", "Room Measurement",
JOptionPane.INFORMATION_MESSAGE);
{
System.exit(0);
}
}
}