1) How to make in a normal example a double condition in a switch? I tried everything you can.
In this example, the compiler swears.
public class Ivan { public static void main(String[] args) { int a = 5, b = 10; switch(a, b){ case 5: case 10: System.out.println("Правильно"); break; case 6: case 11: System.out.println("Неправильно"); break; default: System.out.println("Потеря потерь"); break; } } } 2) Is it possible to fill the values in each element into an array with a size of 10 elements through a loop? If so, how?
3) Is it possible to make the array contain both strings and integers and fractional values? If so, how?
Какой-нибудь_общий_тип array[] = {1, "Hello", 12.5}; Thank you in advance kind people!