Commit eddc7937 authored by abdulrazaq's avatar abdulrazaq

First commit comment

parents
/.metadata/
/.recommenders/
MyApp01 @ e1b6c02a
Subproject commit e1b6c02a775db74357dfa4d43e0b5d475acfe254
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>MyApp03</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8
/* This is an illustration of comments
* that span multiple lines.
* The program displays an input taken from the user during the lab session of
* of Introduction to programming
*/
// Step 1: import the facility
import java.util.Scanner;
import javax.swing.JOptionPane;
public class myApp03 {
public static void main(String[] args) {
// Step 2
Scanner input = new Scanner(System.in);
// Step 3
// This is an example of creating a variable of type string
String text;
/* This is an illustration of comments
* that span multiple lines.
*
*/
// Step 4
text = input.nextLine();
// System.out.println("Hi " + text + ", welcome to Java.");
JOptionPane.showMessageDialog(null, "Hi " + text + ", welcome to Java.");
}
}
/* This is an illustration of comments
* that span multiple lines at the ending of the program.
*
*/
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>myApp04</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8
// An application for adding two numbers.
package myApp04;
import java.util.Scanner; // Step 1
import javax.swing.JOptionPane; // Step 1
public class myApp04 {
public static void main(String[] args) {
Scanner input = new Scanner(System.in); // Step 2
String t1, t2; // Step 3
t1 = JOptionPane.showInputDialog("Please, enter the first number");
t2 = JOptionPane.showInputDialog("Please, enter the second number");
// System.out.println("Please enter two numbers:");
//t1 = input.next(); // Step 4
// t2 = input.next();
int num1, num2;
num1 = Integer.parseInt(t1);
num2 = Integer.parseInt(t2);
JOptionPane.showMessageDialog(null, num1 + " + " + num2 + " = " + (num1 * num2) );
//System.out.print( num1 + " + " + num2 + " = " + (num1 * num2) );
// System.out.print( t1 + " + " + t2 + " = " + (t1 + t2) );
}
}
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>myApp2</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8
package myApp2;
import javax.swing.JOptionPane;
public class myApp02 {
public static void main(String[] args) {
JOptionPane.showMessageDialog(null, "Welcome to Java World");
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment