Witam,
Dla Was sprawa trochę banalna
Chodzi o przypisanie wartości do parametru "a" w zależności od wartości parametru i
Wywala mi ten fragment kodu z komunikatem:
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
Syntax error on token "int", delete this token
a cannot be resolved to a variable i nie wiem czemu eclipse czepia się tego int, z double też "nie chodzi"
Kod jest taki
int i=0;
if (i=0)
int a=1;
else
int a=2;
problem jest z tym fragmentem int a = 1 lub 2 - jak wstawię system out print to instrukcja chodzi.