Это дает мне эту ошибку при запуске, имя класса AQueueClass Любая помощь?Ошибка: Не удалось найти или загрузить главный
package `com.thekyle.hi;`
class QDemo {
// a queue class for characters
char q[]; // this array holds the queue
int putloc, getloc; // the put and get indices
QDemo(int size) {
q = new char[size + 1];
putloc = getloc = 0;
}// put a character into the queue
void put(char ch) {
if (putloc == q.length - 1) {
System.out.println(" - Queue is full silly- ");
return;
}
putloc++;
q[putloc] = ch;
}
char get() {// gets a character from the queue
if (getloc == putloc) {
System.out.println(" Queue is empty");
return (char) 0;
}
getloc++;
return q[getloc];
}
}
class AQueueClass {
public static void main(String args[]) {
QDemo bigQ = new QDemo(100);
QDemo smallQ = new QDemo(4);
char ch;
int i;
System.out.println("Using bigQ to store the alphabet");
for (i = 0; i < 26; i++) {
bigQ.put((char) ('A' + i));
// retrieve and display elements from bigQ
System.out.println("Contents of bigQ: ");
for (i = 0; i < 26; i++) {
ch = bigQ.get();
if (ch != (char) 0)
System.out.print(ch);
}
System.out.println("\n");
System.out.println("Using small q to generate errors");
for (i = 0; i < 5; i++) {
System.out.print("Attemting to store " + (char) ('Z' - i));
smallQ.put((char)('Z' - i));
System.out.println();
}
System.out.println();
System.out.println("Contents of smallQ: ");
for (i = 0; i < 5; i++) {
ch = smallQ.get();
if(ch != (char) 0) System.out.print(ch);
}
}
}
}
Если это проблема пути класса, где я могу найти путь к классу? И поскольку в нем говорится, что мне нужно больше деталей, так что вот несколько наполнителей.
«И поскольку в нем говорится, что мне нужно больше деталей». Вам лучше добавить немного вместо бесполезного наполнителя. Что-то вроде полного сообщения об ошибке или того, как вы пытаетесь запустить свой класс ... и действительно ли эти тики вокруг объявления вашего пакета? – Marvin
Ошибка: не удалось найти или загрузить основной класс com.thekyle.hi.AQueueClass $ BigE –