Berk Ay :
package com.company;
import java.util.InputMismatchException;
import java.util.Scanner;
import java.util.concurrent.ThreadLocalRandom;
public class Main {
//Objeler
static int hak_sayisi = 5;
static int kazanilacak_puan,secilmissayi = 0,mevcut_puan = 0;
static String sayı_aralık;
public static void main(String[] args) {
// Hoşgeldin ve Kurallar Bölümü
System.out.println("Merhaba, 'Sayı Tahmin Etmece' oyununa hoşgeldiniz! ");
}
}
This code works fine in IntelliJ IDEA, but when I try to run it in an online IDE I get this error:
Error: Could not find or load main class Main
Caused by: java.lang.ClassNotFoundException: Main
What does this mean and how do I fix it?
John Kugelman :
package com.company;
Get rid of the package name at the top. JDoodle can't find Main
if it's inside a package.
Guess you like
Origin http://10.200.1.11:23101/article/api/json?id=389045&siteId=1