nicht kompilierbare Zeile auskommentiert.

This commit is contained in:
roman.schenk37@gmail.com 2021-09-30 15:30:44 +02:00
parent 9022fa3546
commit e8fcfde21b
7 changed files with 91 additions and 44 deletions

8
.idea/.gitignore vendored Normal file
View File

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/

6
.idea/misc.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_16" project-jdk-name="openjdk-17" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

8
.idea/modules.xml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/02_Praktikum-2_Ausdruck.iml" filepath="$PROJECT_DIR$/02_Praktikum-2_Ausdruck.iml" />
</modules>
</component>
</project>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
<option value="com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer" />
</set>
</option>
</component>
</project>

6
.idea/vcs.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

View 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$" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@ -2,53 +2,51 @@
public class Ausdruck {
public void ausgeben() {
int int1 = 1, int2 = 2, int3 = 3;
double double1 = 3.0, double2 = 4.0;
boolean boolean1 = true;
System.out.println(int1 + int2 + int3--);
System.out.println(int3);
System.out.println(--int3);
int3 = 3;
System.out.println(int1 + int2 * int3);
System.out.println((int1 + int2) * int3);
System.out.println(int1 / int2 + ", " + int3 / int2);
System.out.println(int1 / double1 + ", " + double2 / int3);
System.out.println(int1 / 4 + ", " + int1 / 4.0);
System.out.println (int2 / int3 * double1);
System.out.println (int2 / (int3 * double1));
System.out.println(9 % 4 + ", " + 9.0 % 4);
System.out.println("Ein Hund hat " + 2 + 2 + " Beine");
System.out.println("Ein Hund hat " + (2 + 2) + " Beine");
System.out.println("Zwei Hunde haben " + 2 * 4 + " Beine");
System.out.println(int1 == int2);
System.out.println(int1 == int3 / int2);
System.out.println((int3 <= 3) && (double2 <= 2.999999));
System.out.println((int3 < 3) || !(double2 <= 2.999999));
System.out.println((int3 <= 3) && !(double2 <= 2.999999));
System.out.println(boolean1 = 7 > 6);
System.out.println(int3 = int1 + int2 == 3);
System.out.println((int3 = int2 - int1) == 1);
System.out.println(3 * 1000000);
System.out.println(3 * 10000000);
System.out.println(3 * 100000000);
System.out.println(3 * 1000000000);
System.out.println(3 * 1000000000L);
System.out.println(3 * 1000000000d);
}
public static void main(String[] args) {
(new Ausdruck()).ausgeben();
int int1 = 1, int2 = 2, int3 = 3;
double double1 = 3.0, double2 = 4.0;
boolean boolean1 = true;
System.out.println(int1 + int2 + int3--);
System.out.println(int3);
System.out.println(--int3);
int3 = 3;
System.out.println(int1 + int2 * int3);
System.out.println((int1 + int2) * int3);
System.out.println(int1 / int2 + ", " + int3 / int2);
System.out.println(int1 / double1 + ", " + double2 / int3);
System.out.println(int1 / 4 + ", " + int1 / 4.0);
System.out.println (int2 / int3 * double1);
System.out.println (int2 / (int3 * double1));
System.out.println(9 % 4 + ", " + 9.0 % 4);
System.out.println("Ein Hund hat " + 2 + 2 + " Beine");
System.out.println("Ein Hund hat " + (2 + 2) + " Beine");
System.out.println("Zwei Hunde haben " + 2 * 4 + " Beine");
System.out.println(int1 == int2);
System.out.println(int1 == int3 / int2);
System.out.println((int3 <= 3) && (double2 <= 2.999999));
System.out.println((int3 < 3) || !(double2 <= 2.999999));
System.out.println((int3 <= 3) && !(double2 <= 2.999999));
System.out.println(boolean1 = 7 > 6);
//System.out.println(int3 = int1 + int2 == 3);
System.out.println((int3 = int2 - int1) == 1);
System.out.println(3 * 1000000);
System.out.println(3 * 10000000);
System.out.println(3 * 100000000);
System.out.println(3 * 1000000000);
System.out.println(3 * 1000000000L);
System.out.println(3 * 1000000000d);
}
}