עבור לתוכן
View in the app

A better way to browse. Learn more.

HWzone

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

למישהו יש רעיון על מה השגיאה בקימפול בJAVA?

Featured Replies

פורסם

כל פעם השורה השניה מסומנת לי בזמן הקימפול.


Scanner console = new Scanner(System.in);

System.out.print ("pleaze type a number:");

השגיאה שמתקבלת:


<identifier> expected

והנה הקוד של כל התוכנית:


import java.util.Scanner;
public class hyper{
public static void main (stirn[] args);

Scanner console = new Scanner(System.in);

system.out.print ("pleaze type a number:");
double 1 = console.nextInt();
system.out.prinln ("please type another number:")
double 2 = console.nextInt();
system.out.prinln ("pvvv:
")
int 3 = console.nextInt();
system.out.prinlt ("please type ")
}

פורסם
  • מחבר

בסדר אחרי העריכה? מה הכוונה השגיאה המדוייקת?

פורסם

הכוונה לעשות copy ו-paste על כל הודעת השגיאה.

הנה הבעיות שלך:

public static void main (stirn[] args);

צריך להיות string ולא stirn, והשורה לא צריכה להסתיים ב-; אלא ב-} (וגם בסוף הקובץ צריך לסגור את הסוגריים המסולסלים בהתאם).

system.out.prinln ("please type another number:")

ה-S ב-System צריכה להיות גדולה, וזה צריך להיות println (שכחת את ה-t).

system.out.prinln ("pvvv:
")

כנ"ל, ואסור שתהיה ירידת שורה באמצע מחרוזת.

פורסם

בנוסף, מספרים אינם יכולים להיות שמות משתנים

פורסם
  • מחבר

פששש עובד עכשיו :)

תודה רבה

ארכיון

דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.

דיונים חדשים

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.