first try
This commit is contained in:
commit
36b09d54da
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
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>
|
11
SEWS19.iml
Normal file
11
SEWS19.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>
|
23
src/HelloWorld.java
Normal file
23
src/HelloWorld.java
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
|
||||||
|
//static (bei Methoden)=> keine Instanz
|
||||||
|
|
||||||
|
public class HelloWorld {
|
||||||
|
public static void main(String[] args){
|
||||||
|
System.out.println("Hello World");
|
||||||
|
int j = 0;
|
||||||
|
for(int i = 0; i<=200; i++){
|
||||||
|
if(i%5==0){
|
||||||
|
System.out.println(i + " ist durch 5 teilbar");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(i%10==9){
|
||||||
|
System.out.println(i + " endet auf 9");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(((i+j)%3)==0){
|
||||||
|
System.out.println(i + " und " + j + " addiert ergeben " + (i+j) + " und " + (i+j) + " ist durch 3 teilbar.");
|
||||||
|
}
|
||||||
|
j=i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
36
src/Visitenkarte.java
Normal file
36
src/Visitenkarte.java
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
public class Visitenkarte {
|
||||||
|
|
||||||
|
public String name;
|
||||||
|
public String firstName;
|
||||||
|
public String job;
|
||||||
|
public String age;
|
||||||
|
public String address;
|
||||||
|
public String phoneNumber;
|
||||||
|
|
||||||
|
|
||||||
|
public Visitenkarte(String name, String firstName, String job, String age, String address, String phoneNumber){
|
||||||
|
this.name = name;
|
||||||
|
this.firstName = firstName;
|
||||||
|
this.job = job;
|
||||||
|
this.age = age;
|
||||||
|
this.address = address;
|
||||||
|
this.phoneNumber = phoneNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void printVisitenkarte(Visitenkarte a){
|
||||||
|
System.out.println("-----------------------------------");
|
||||||
|
System.out.println(a.name + ", " + a.firstName);
|
||||||
|
System.out.println(a.job + ", " + a.age);
|
||||||
|
System.out.println(a.address);
|
||||||
|
System.out.println(a.phoneNumber);
|
||||||
|
System.out.println("-----------------------------------");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
Visitenkarte tabea = new Visitenkarte("Strauss", "Tabea", "student", "27", "Untere Baustr. NBG", "017712345");
|
||||||
|
printVisitenkarte(tabea);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user