Welcome to Dream.In.Code
Become a Java Expert!

Join 149,481 Java Programmers for FREE! Get instant access to thousands of Java experts, tutorials, code snippets, and more! There are 1,392 people online right now. Registration is fast and FREE... Join Now!




error 300

 
Reply to this topicStart new topic

error 300, new to java

ebonyangel
20 Apr, 2007 - 08:53 AM
Post #1

New D.I.C Head
*

Joined: 7 Mar, 2007
Posts: 3


My Contributions
Anyone to help please? I am trying to simulate a program for two students who decide to revise a course unit and watch TV as well. The first part is giving me a hell of a problem. I have tried and now must confess that i need some guidance. Attached are my student codes and unit codes. Please could anyone suggest possible ways to move on? Thanks in advance.




CODE
  public class Student extends Thread {

private int id;          // student id; can take the values 1 or 2
private Unit unit;           // the Unit they are studying

// code for two-argument constructor
    int id1=student1;
    int id2=student2;
public void run() {
    for (int session = 1; session < 4; session++) {
      unit.revise(id,session);
      System.out.println("Student " + id + " has TV break number " + session);
      try {
        Thread.sleep(5);
        }catch (InterruptedException e) {}
      }
    }


  public static void main(String[] args) {
    Unit courseUnit = new Unit();
    // code to create and start two threads (the students)
    Student student1=new Student();
    Student student2=new Student();
    }
}

Attached File  src.zip ( 755bytes ) Number of downloads: 24
Attached File  src.zip ( 755bytes ) Number of downloads: 24
Attached File  src.zip ( 755bytes ) Number of downloads: 24

User is offlineProfile CardPM
+Quote Post

Amadeus
RE: Error 300
20 Apr, 2007 - 08:57 AM
Post #2

g++ -o drink whiskey.cpp
Group Icon

Joined: 12 Jul, 2002
Posts: 12,349



Thanked: 51 times
Dream Kudos: 25
My Contributions
Can you post the exact error message you receive?
User is online!Profile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/7/09 04:26PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Java Help!

Java Tutorials

Reference Sheets

Java Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month