a the values domain of the data type byte is [-128,127] . 1 is in the domain , but i get the error : incompatible types: possible lossy conversion from int to byte.
Datei de/codegym/task/task15/task1508/Solution.java, Zeile 9, Position 178
please correct me if there is something about bytes i missunderstand.
package de.codegym.task.task15.task1508;
/*
OOP: Methodenüberldung – Überflüssiges muss weg
*/
public class Solution {
public static void main(String[] args) {
print(1);
}
//7ata ta3 long normalement tji
public static void print(byte b) {
System.out.println("Ich werde Java-Programmierer!");
}
/*public static void print(double d) {
System.out.println("Ich werde Java-Programmierer!");
}*/
/*public static void print(long l) {
System.out.println("Ich werde Java-Programmierer!");
}*/
/*public static void print(float f) {
System.out.println("Ich werde Java-Programmierer!");
}*/
/*public static void print(char c) {
System.out.println("Ich werde Java-Programmierer!");
}*/
}
print((byte) 1);