Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package de.godlotus.main;
- import java.io.File;
- import java.util.ArrayList;
- import java.util.Scanner;
- import javax.swing.JOptionPane;
- public class Main {
- public static void main(String[] args) {
- /*
- * STRG+S speichern
- * STRG+SPACE autovervollständigung
- *
- * STRG+SHIFT+F auto formatierung
- * STRG+SHIFT+O auto inport
- * STRG+SHIFT+S
- */
- boolean geil = true; // true/false
- short s = 233; // 255 - -255
- int i = 0; // 2M - -2M number
- long l = 4923749284490284L; // big number
- char c = '?'; // zeichen
- float h = 233.445355435345355345345354354353455543534535534534535435435345554353453553453453543543534555435345355345345354354353453545354535345353f;
- double d = 323.445355435345355345345354354353455543534535534534535435435345554353453553453453543543534555435345355345345354354353453545354535345353;
- byte by;
- String test = "nein";
- File file = new File("D:/xampp1/xampp-control.txt");
- File config = new File("config.yaml");
- System.out.println(überschrift("##### god lotus apptest #####"));
- System.out.println(überschrift("if abfragen"));
- if (geil) {
- System.out.println("Mach ich weil es geil ist!");
- } else if (test.equals("nein")) {
- System.out.println("Sie will nicht angefasst werden!");
- } else if (test.equals("nein")) {
- System.out.println("Sie will nicht angefasst werden!");
- } else if (test.equals("nein")) {
- System.out.println("Sie will nicht angefasst werden!");
- } else if (test.equals("nein")) {
- System.out.println("Sie will nicht angefasst werden!");
- } else {
- System.out.println("Nein es ist nicht geil!");
- }
- System.out.println(überschrift("while schleife"));
- while(i < 3) {
- System.out.println("GEILE TITTEN:" + i);
- i++;
- }
- System.out.println(überschrift("do while schleife"));
- i = 100;
- do {
- System.out.println("GEILE BEINE:" + i);
- i++;
- } while(i < 3);
- System.out.println(überschrift("for schleife"));
- for(int j = 0; j < 3; j++) {
- System.out.println("test:" + j);
- }
- //ARRAY
- String[] stringArray = new String[5];
- stringArray[0] = "hallo";
- stringArray[1] = "welt";
- stringArray[2] = "ich bin";
- stringArray[3] = "god lotus";
- stringArray[4] = "god fötus rötus";
- System.out.println(überschrift("array durchgang mit while schleife"));
- i = 0;
- while(i < stringArray.length) {
- System.out.println("TEST:" + stringArray[i]);
- i++;
- }
- System.out.println(überschrift("array durchgang mit for schleife"));
- for(String value : stringArray) {
- System.out.println("TEST2:" + value);
- }
- //END ARRAY
- //ARRAYLIST
- ArrayList<String> wortSalat = new ArrayList<String>();
- wortSalat.add("hey");
- wortSalat.add("ich");
- wortSalat.add("bin");
- wortSalat.add("der");
- wortSalat.add("god fötus");
- System.out.println(überschrift("arraylist durchgang mit while schleife"));
- i = 0;
- while(i < wortSalat.size()) {
- System.out.println("TEST:" + wortSalat.get(i));
- i++;
- }
- System.out.println(überschrift("arraylist durchgang mit for schleife"));
- for(String value : wortSalat) {
- System.out.println("TEST2:" + value);
- }
- //END ARRAYLIST
- System.out.println(überschrift("console scanner"));
- String input = consoleInput();
- System.out.println("INPUT:" + input);
- System.out.println(überschrift("window input"));
- input = JOptionPane.showInputDialog("TEST TEXT LUL:");
- JOptionPane.showMessageDialog(null, "YOUR IMPORTANT INPUT:\n" + input);
- }
- public static String consoleInput() {
- Scanner scanner = new Scanner(System.in);
- while(!scanner.hasNext()) {}
- String input = scanner.next();
- scanner.close();
- return input;
- }
- public static void test() {
- System.out.println("test!!!!");
- }
- public static double getPIX2() {
- double pi = 3.1415;
- pi = pi * 2;
- return pi;
- }
- public static String überschrift(String name) {
- return name.toUpperCase() + ":";
- }
- public static String überschrift(String name, int i, int y) {
- return name.toUpperCase() + ": (" + i + "/" + y + ")";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement