Results 1 to 3 of 3
Thread: Íÿêàêâà ãðåøêà (Java)
Hybrid View
-
9th May 2010 19:15 #1Registered User
Join Date: May:2010
Location: Öàðåâî
Posts: 7
Íÿêàêâà ãðåøêà (Java)
Ñòàâà âúðïðîñ çà Java.
Öåëèÿ êîä å òîâà:
Äîëó â êîíçîëêàòà ìè ïèøå åé òîâà:public class HelloJava {
byte centuries = 20;
short years = 2000;
int days = 730480;
long hours = 17531520;
System.out.println(centuries + " centuries is " + years +
" years, or " + days+ " days, or " + hours + " hours.");
}
À ãîðå, íà ðåäà(ïðè x-÷åòî) ñëåäíîòî:java.lang.NoSuchMethodError: main
Exception in thread "main"
Àêî ìîæå äà ìè ïîìîãíåòå, ùå ñúì áëàãîäàðåí.Multiple markers at this line
-Syntax error on token "println", = expected after this token
-Syntax error on token(s), misplaced construct(s)
-
9th May 2010 21:29 #2Registered User
Join Date: Dec:2007
Location: Sofia
Posts: 366
Äåôèíèðàë ñè êëàñ, íî íå ñè äåôèíèðàë ìåòîä
Îïèòàé ñ íåùî òàêîâà
Code:public class HelloJava { public static void main(String[] args) { // âìúêíè êîäà ñè òóê } }
-
9th May 2010 21:42 #3Registered User
Join Date: May:2010
Location: Öàðåâî
Posts: 7
Äà, ïðàâèëíî, ïîëó÷è ñå. Ìîÿòà ãðåøêà áåøå, ÷å ñëàãàì èìåííî òîçè ìåòîä main ñëåä êîäà. Áëàãîäàðÿ ìíîãî.
Ïîçäðàâè!




Reply With Quote
Lenovo ThinkPad 15 èëè IdeaPad 15
5th May 2023, 22:16 in Ìîáèëíè êîìïþòðè