Of course! Here are some examples of Java code that showcase various syntax and features of the language. Feel free to study and modify them to gain a better understanding of Java.

1. **Hello World:**
```java
public class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello, World!");
    }
}
```

2. **Variables and Data Types:**
```java
public class DataTypesExample {
    public static void main(String[] args) {
        int age = 25;
        double salary = 50000.75;
        char gender = 'M';
        boolean isStudent = true;
        String name = "John";

        System.out.println(name + " is " + age + " years old.");
        System.out.println("Salary: " + salary);
        System.out.println("Gender: " + gender);
        System.out.println("Is a student? " + isStudent);
    }
}
```

3. **Conditional Statements:**
```java
public class ConditionalExample {
    public static void main(String[] args) {
        int score = 85;

        if (score >= 90) {
            System.out.println("Excellent!");
        } else if (score >= 70) {
            System.out.println("Good job!");
        } else {
            System.out.println("Keep practicing.");
        }
    }
}
```

4. **Loops:**
```java
public class LoopExample {
    public static void main(String[] args) {
        for (int i = 1; i <= 5; i++) {
            System.out.println("Count: " + i);
        }

        int num = 1;
        while (num <= 5) {
            System.out.println("Number: " + num);
            num++;
        }
    }
}
```

5. **Arrays:**
```java
public class ArrayExample {
    public static void main(String[] args) {
        int[] numbers = { 10, 20, 30, 40, 50 };
        String[] names = { "Alice", "Bob", "Charlie" };

        System.out.println("Second number: " + numbers[1]);
        System.out.println("Name at index 2: " + names[2]);

        for (int number : numbers) {
            System.out.println("Number: " + number);
        }
    }
}
```

6. **Functions (Methods):**
```java
public class MethodExample {
    public static void main(String[] args) {
        int result = addNumbers(10, 20);
        System.out.println("Sum: " + result);
    }

    static int addNumbers(int a, int b) {
        return a + b;
    }
}
```

7. **Object-Oriented Programming (OOP):**
```java
class Dog {
    String name;
    int age;

    void bark() {
        System.out.println(name + " is barking.");
    }
}

public class OOPExample {
    public static void main(String[] args) {
        Dog myDog = new Dog();
        myDog.name = "Buddy";
        myDog.age = 3;
        myDog.bark();

        Dog anotherDog = new Dog();
        anotherDog.name = "Max";
        anotherDog.age = 5;
        anotherDog.bark();
    }
}
```

These examples cover a range of Java's syntax and features, including basic syntax, variables, data types, conditional statements, loops, arrays, functions, and object-oriented programming concepts. Feel free to experiment with these examples and build upon them as you continue to learn Java.
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence