diff --git a/Aufgabe4/Token.java b/Aufgabe4/Token.java
new file mode 100644
index 0000000000000000000000000000000000000000..137bef2823f70d10d42d94f246eefa2c902ff652
--- /dev/null
+++ b/Aufgabe4/Token.java
@@ -0,0 +1,28 @@
+public class Token {
+
+    TokenType tokenType;
+    String tokenString;
+
+    Token(TokenType tokenType, String tokenString) {
+
+        this.tokenType = tokenType;
+        this.tokenString = tokenString;
+
+    }
+
+    public TokenType getTokenType() {
+        return tokenType;
+    }
+
+    public void setTokenType(TokenType tokenType) {
+        this.tokenType = tokenType;
+    }
+
+    public String getTokenString() {
+        return tokenString;
+    }
+
+    public void setTokenString(String tokenString) {
+        this.tokenString = tokenString;
+    }
+}
diff --git a/Aufgabe4/TokenType.java b/Aufgabe4/TokenType.java
new file mode 100644
index 0000000000000000000000000000000000000000..5e4da31680b87cf95af435b714f860bcc50b225e
--- /dev/null
+++ b/Aufgabe4/TokenType.java
@@ -0,0 +1 @@
+public enum TokenType { number, var, special }
diff --git a/Aufgabe4/main.java b/Aufgabe4/main.java
new file mode 100644
index 0000000000000000000000000000000000000000..c42fee51834636514fd883f3726d13e5f19fa21d
--- /dev/null
+++ b/Aufgabe4/main.java
@@ -0,0 +1,154 @@
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+public class main {
+    public static void main(String[] args){
+
+        // 23, x, +, (,0, 5, x,), ^, 2, -, 1
+        String ausdruck = "23x +(0,5x)^20−10";
+
+        ArrayList<String> separatedChar = new ArrayList<String>();
+
+        List<Token> tokenList = new ArrayList<>();
+
+        separatedChar.add("|");
+        for (char c : ausdruck.toCharArray()) {
+
+            if(Character.isWhitespace(c)){
+                continue;
+            }
+
+            if(Character.isDigit(c)) {
+
+                separatedChar.add( String.valueOf(c) );
+
+            } else {
+                separatedChar.add("|");
+                separatedChar.add( String.valueOf(c) );
+                separatedChar.add("|");
+            }
+        }
+        separatedChar.add("|");
+
+        System.out.println(separatedChar);
+
+        ArrayList<String> tokens = new ArrayList<String>();
+        String temp = "";
+
+
+        for(String c : separatedChar) {
+
+            if(Objects.equals(c, "|")) {
+
+                if(temp != "") {
+                    tokens.add(temp);
+                }
+                temp = "";
+            } else {
+                temp = temp + c;
+            }
+        }
+
+        System.out.println(tokens);
+
+        Boolean notANumber = false;
+
+        for(String s : tokens) {
+
+            try {
+                int val = Integer.parseInt(s);
+                tokenList.add(new Token(TokenType.number, s));
+            } catch (NumberFormatException ignored) {
+
+                notANumber = true;
+
+            }
+
+            if(notANumber) {
+
+                if (Character.isLetter( s.charAt(0) )) {
+                    tokenList.add(new Token(TokenType.var, s));
+                } else {
+                    tokenList.add(new Token(TokenType.special, s));
+                }
+                notANumber = false;
+            }
+
+        }
+
+        for(Token t : tokenList) {
+            System.out.println(t.getTokenString() + " " + t.getTokenType());
+        }
+
+
+
+        /*
+
+        for(int i = 0; i < ausdruck.length(); i++) {
+
+            if(Character.isWhitespace(ausdruck.charAt(i))) {
+                continue;
+            }
+
+
+            if(typeOfLast == TokenType.number && Character.isDigit(ausdruck.charAt(i)) && i != 0) {
+
+                temp = temp + ausdruck.charAt(i-1);
+                //charList.add(String.valueOf( ausdruck.charAt(i) ));
+
+            } else {
+
+                if(temp.equals("")) {
+
+                    charList.add(String.valueOf( "|" + ausdruck.charAt(i) + "|"));
+
+                } else {
+
+                    charList.add(String.valueOf( "|" + temp +  "|"));
+                    charList.add(String.valueOf( "|" + ausdruck.charAt(i) + "|"));
+
+                    temp = "";
+                }
+            }
+
+
+            if(Character.isDigit(ausdruck.charAt(i)))
+                typeOfLast = TokenType.number;
+            else if(Character.isLetter(ausdruck.charAt(i)))
+                typeOfLast = TokenType.var;
+            else
+                typeOfLast = TokenType.special;
+
+        }
+
+        System.out.println(charList);
+
+
+        /*
+        for (char c : ausdruck.toCharArray()) {
+
+            if(Character.isWhitespace(c)) {
+                continue;
+            }
+
+
+            if(typeOfLast == TokenType.number && Character.isDigit(c)) {
+                System.out.print(c);
+            } else {
+                System.out.println();
+                System.out.print(c);
+            }
+
+            if(Character.isDigit(c))
+                typeOfLast = TokenType.number;
+            else if(Character.isLetter(c))
+                typeOfLast = TokenType.var;
+            else
+                typeOfLast = TokenType.special;
+        }
+        */
+
+    }
+}
+