Add Main Class so IntelliJ is happy
This commit is contained in:
parent
9688d45433
commit
c653aac568
1
.idea/gradle.xml
generated
1
.idea/gradle.xml
generated
@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GradleMigrationSettings" migrationVersion="1" />
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
|
9
src/main/java/Main.java
Normal file
9
src/main/java/Main.java
Normal file
@ -0,0 +1,9 @@
|
||||
import de.dhbw.parprog.JavaPipe;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) throws IOException {
|
||||
JavaPipe.PipeMain();
|
||||
}
|
||||
}
|
@ -2,15 +2,8 @@ package de.dhbw.parprog;
|
||||
|
||||
import de.dhbw.parprog.processemu.Pipe;
|
||||
import de.dhbw.parprog.processemu.ProcessEmu;
|
||||
import org.apache.commons.lang.NotImplementedException;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.nio.file.AccessMode;
|
||||
import java.sql.SQLOutput;
|
||||
import java.util.List;
|
||||
import java.util.Vector;
|
||||
|
||||
|
||||
public class JavaPipe {
|
||||
@ -19,7 +12,7 @@ public class JavaPipe {
|
||||
BufferedReader in = new BufferedReader(new InputStreamReader(inputstream));
|
||||
*/
|
||||
|
||||
public static void main(String[] args) throws IOException {
|
||||
public static void PipeMain() throws IOException {
|
||||
int Amount = 42;
|
||||
int[] allResults = new int[Amount];
|
||||
Pipe[] pipes = new Pipe[Amount];
|
||||
@ -36,9 +29,9 @@ public class JavaPipe {
|
||||
System.out.println("sup nerd");
|
||||
|
||||
int sum = 0;
|
||||
for(int i = 0; i<allResults.length; i++){
|
||||
sum += allResults[i];
|
||||
System.out.println("Got a return of " + allResults[i]);
|
||||
for (int allResult : allResults) {
|
||||
sum += allResult;
|
||||
System.out.println("Got a return of " + allResult);
|
||||
}
|
||||
|
||||
System.out.println("The sum is " + sum);
|
||||
|
Loading…
Reference in New Issue
Block a user