I have a problem with "possible lossy conversion from int to byte" error, but I am not converting integer to byte in my code.
public static void main(String[] args) {
Notebook ntb = new Notebook("Acer","Aspire",15000.0f,20,"Intel Core I73632QM",4,2.2f,"GeForce GT720M",2,8,1000,15.6f,100,150,"DVD"); //<- error here
}
And here is Notebook class
package semestralka;
public class Notebook extends produkt.Produkt{
private String procesor;
private byte pocetJader;
private float frekvence;
private String GPU;
private byte pametGPU;
private byte operacniPamet;
private int pevnyDisk;
private float uhloprickaDispleje;
private int sirka;
private int vyska;
private String mechanika;
public Notebook(String vyrobce, String model, float cena, int pocet, String procesor, byte pocetJader, float frekvence, String GPU, byte pametGPU, byte operacniPamet, int pevnyDisk, float uhloprickaDispleje, int sirka, int vyska, String mechanika) {
this.vyrobce = vyrobce;
this.model = model;
this.cena = cena;
this.pocet = pocet;
this.procesor = procesor;
this.pocetJader = pocetJader;
this.frekvence = frekvence;
this.GPU = GPU;
this.pametGPU = pametGPU;
this.operacniPamet = operacniPamet;
this.pevnyDisk = pevnyDisk;
this.uhloprickaDispleje = uhloprickaDispleje;
this.sirka = sirka;
this.vyska = vyska;
this.mechanika = mechanika;
}
//getters
public String getProcesor() {
return procesor;
}
public byte getPocetJader() {
return pocetJader;
}
public String getGPU() {
return GPU;
}
public byte getPametGPU() {
return pametGPU;
}
public byte getOperacniPamet() {
return operacniPamet;
}
public int getPevnyDisk() {
return pevnyDisk;
}
public float getUhloprickaDispleje() {
return uhloprickaDispleje;
}
public int getSirka() {
return sirka;
}
public int getVyska() {
return vyska;
}
public String getMechanika() {
return mechanika;
}
}
I don't know why I am getting this error. Can anyone help me please? Thank you.