Код: Выделить всё
Hello everyone, friends. There is such a code that converts characters from lowercase to uppercase and vice versa. You need to make a file the .jar is executable. I tried to do this through Launch4j, but the file doesn't run, there aren't even any errors. Has anyone ever encountered such a thing? My guess is that the code does not match the executable file
импортировать java.util.Scanner;
public class Main {public static void main(String[] args)
{
Код: Выделить всё
String input;
Scanner scan = new Scanner(System.in);
System.out.println("Введите символы:");
input = scan.next();
char[] chars = input.toCharArray();
for (int i = 0; i < chars.length; i++) {
char c = chars[i];
if (Character.isUpperCase(c)) {
chars[i] = Character.toLowerCase(c);
} else if (Character.isLowerCase(c)) {
chars[i] = Character.toUpperCase(c);
}`your text`
}
input = new String(chars);
System.out.println(input);
try {
int c = System.in.read();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
Пытался сделать это через Launch4j, но файл не запускается, даже ошибок нет.
Подробнее здесь: https://stackoverflow.com/questions/782 ... table-file