ShowMyInfo program
This commit is contained in:
commit
b47513a6f3
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
*.class
|
3
lab-0/.idea/.gitignore
vendored
Normal file
3
lab-0/.idea/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
6
lab-0/.idea/misc.xml
Normal file
6
lab-0/.idea/misc.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
8
lab-0/.idea/modules.xml
Normal file
8
lab-0/.idea/modules.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/lab-0.iml" filepath="$PROJECT_DIR$/lab-0.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
6
lab-0/.idea/vcs.xml
Normal file
6
lab-0/.idea/vcs.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
|
||||
</component>
|
||||
</project>
|
7
lab-0/ShowMyInfo-output.txt
Normal file
7
lab-0/ShowMyInfo-output.txt
Normal file
@ -0,0 +1,7 @@
|
||||
/usr/lib/jvm/java-11-openjdk/bin/java -javaagent:/usr/share/idea/lib/idea_rt.jar=45631:/usr/share/idea/bin -Dfile.encoding=UTF-8 -classpath /home/hesham/Dev/EE364-lab/lab-0/out/production/lab-0 ShowMyInfo
|
||||
Enter your name: Hesham
|
||||
Enter your age: 23
|
||||
Welcome Hesham, your age is 23
|
||||
|
||||
Process finished with exit code 0
|
||||
|
11
lab-0/lab-0.iml
Normal file
11
lab-0/lab-0.iml
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
14
lab-0/src/ShowMyInfo.java
Normal file
14
lab-0/src/ShowMyInfo.java
Normal file
@ -0,0 +1,14 @@
|
||||
import java.util.Scanner;
|
||||
|
||||
public class ShowMyInfo {
|
||||
public static void main(String args[]){
|
||||
Scanner input = new Scanner(System.in);
|
||||
String name;
|
||||
int age;
|
||||
System.out.print("Enter your name: ");
|
||||
name = input.nextLine();
|
||||
System.out.print("Enter your age: ");
|
||||
age = input.nextInt();
|
||||
System.out.println("Welcome "+ name + ", your age is " + age);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user