Results 1 to 15 of 15

Thread: class error

  1. #1
    mrajan's Avatar
    mrajan is offline Member
    Join Date
    Jun 2010
    Posts
    12
    Rep Power
    0

    Default class error

    guys in this code it says i hove no main class
    but isnt this the main class
    ' 'public class Blackjack extends Applet implements ActionListener, Runnable { "

    Java Code:
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    
    public class Blackjack extends Applet implements ActionListener, Runnable {
    char v[]={'a','2','3','4','5','6','7','8','9','t','j','q','k'};
       char s[]={'c','d','h','s'};
       String []mon = {"$1","$2","$3","$4","$5","$6","$7","$8","$9","$10"};
       String []bLabels = {"KEEP","DRAW","BUY","SPLIT","Insurance"};
       String str="",str2="",calc="punter to my game",winLose="   W E L C O M E!", insure="";
       int numCards, r, k, fin, temp1, temp2, total, total1, total2, ins, edge1, edge2, bet2;
       int bet=1, score=50;
       int []st  = new int[30];
       int []vl = new int[30];
       Image cards[]=new Image[52];
       Image back;
       MediaTracker mt=null;
       Thread theThread = null;
       Color cloth = new Color(30,110,0);
       Color bGrnd = new Color(90,10,0);
       Color pans  = new Color(0,20,70);
       int hand[]=new int[30];
       Panel pan = new Panel();
       Button Deal = new Button("DEAL THE CARDS");
       Button []buts = new Button[5];
       Choice money=new Choice();
       boolean deck[]=new boolean[52];
       boolean begin, newGame=true, blackjack, jackblack, insurance, doCards, drawCard,
               hasAces, split, split1, splitter, dealer, splitScore, finish;
       Font f1 = new Font("Arial",0,18);
       Font f2 = new Font("Arial",0,14);
    
    public void init(){
        loadImages();
        this.setLayout(null);
        setBackground(bGrnd);
        pan.setBounds(15,10,420,330);
        pan.setBackground(cloth);
        add(pan);
        int j=0;
           for(int i=0; i<5; i++){
              buts[i]=new Button(bLabels[i]);
              buts[i].setEnabled(false);
              buts[i].setBounds(450,180+j,70,25);
              buts[i].addActionListener(this);
              add(buts[i]);
              j+=33;
           }
        Deal.setBounds(450,130,135,35);
        Deal.addActionListener(this);
        add(Deal);
           for(int i=0; i<10; i++)money.addItem(mon[i]);
        money.setBounds(535,180,50,80);
        add(money);
        shuffle();
      }
    
         public void shuffle() {
          if(!newGame)winLose="  G A M E  O N";
          newGame=blackjack=jackblack=insurance=drawCard=hasAces=splitScore=splitter=finish=false;
          begin=true;
          edge1=edge2=200;
          r=k=ins=total2=bet2=0;
          numCards=k=2;
          str2=calc=insure="";
          buts[3].setLabel("SPLIT");
          int i,card;
          for (i=0;i<52;i++)deck[i]=false;
          java.util.Random rand = new java.util.Random();
          for (i=0;i<30;i++) {
             while(true) {
                card=rand.nextInt(52);
                if(!deck[card])
                break;
             }
             hand[i]=card;
             deck[card]=true;
          }
          for (i=0;i<30;i++) {
             st[i]=(int)(hand[i]/13);
             vl[i]=hand[i]-((st[i]*13)-1);
          }
       deal();
       }
    
       public synchronized void loadImages() {
          mt = new MediaTracker(this);
          try{
             for(int i=0;i<4;i++){
                for(int j=0;j<13;j++){
                   cards[i*13+j]=getImage(getCodeBase(),"cards/"+v[j]+s[i]+".gif");
                   mt.addImage(cards[i*13+j],0);
                }
             }
             back=getImage(getCodeBase(),"cards/"+"b.gif");
             mt.addImage(back,0);
             mt.waitForAll();
          }catch(InterruptedException e){}
       }
    
        public void start(){
          if(theThread == null) {
             theThread = new Thread(this, "Blackjack");
             theThread.start();
          }
       }
       public void run(){
          Thread thread = Thread.currentThread();
          theThread.setPriority(Thread.MIN_PRIORITY);
          while (theThread == thread){
             try{
                while (doCards){
                  if(r>3) doCards=false;
                  Thread.sleep (500);
                  deal();
                  r++;
                }
                while(split){
                   if(r>1) split=false;
                   Thread.sleep (700);
                   doSplitz();
                   r++;
                }
                while(split1){
                   Thread.sleep (700);
                   if(r>numCards+2) split1=false;
                   doSplitz();
                   r++;
                }
                while(dealer){
                   Thread.sleep (700);
                   if(r==numCards-1)dealer=false;
                   dealerCards();
                   k++;
                   r++;
                }
             }
             catch (InterruptedException ex){}
          }
       }
    
       public void deal(){
       Graphics g = pan.getGraphics();
        if(begin){
          g.setColor(cloth);
          g.fillRect(0,0,420,330);
          g.setColor(Color.yellow);
          g.drawString("DEALERS HAND",37,30);
          g.drawRoundRect(15, 10,200,140,20,10);
          g.drawRoundRect(15,170,edge1,140,20,10);
          begin=false;
        }
        else{
          if(drawCard){
              g.setColor(cloth);
              g.fillRect(110,175,80,20);
              if(numCards < 6){
                 g.fillRect(110,171,edge1-150,32);
                 g.fillRect(150,300,edge1-200,10);
              }
              else g.fillRect(110,171,50,20);
              g.fillRect(20,175,150,20);
              g.setColor(Color.yellow);
              g.drawString("YOUR HAND  "+str,37,190);
              if(numCards<5)g.drawRoundRect(15,170,edge1,140,20,10);
           }
           else {
              g.setColor(cloth);
              g.fillRect(edge1-70,171,6,139);
           }
        int j=80;
        if(r==0){}//pause
        if(r==1) g.drawImage(cards[hand[0]],37,42,this);
        if(r==2) g.drawImage(back,37+j,42,this);
        if(r==3) g.drawImage(cards[hand[1]],37,203,this);
        if(r==4) {
           g.drawImage(cards[hand[2]],37+j,203,this);
           g.setColor(Color.yellow);
           g.drawString("YOUR HAND  "+str,37,190);
        }
        if(numCards==3) {g.drawImage(cards[hand[k]],37+j*2,203,this);}
        if(numCards==4) g.drawImage(cards[hand[k]],37+j*3,203,this);
        if(numCards==5) {
           j=0;
           g.setColor(cloth);
           g.fillRect(30,200,360,102);
           g.setColor(Color.yellow);
              if(str2.length()>1){
                 g.drawImage(cards[hand[2]],37,203,this);
                    for(int i=1; i<4; i++){
                       g.drawImage(cards[hand[k-(numCards-2)+i]],37+j,203,this);
                       j+=75;
                     }
              }
              else{
                 for(int i=0; i<5; i++){
                    g.drawImage(cards[hand[k-(numCards-1)+i]],25+j,203,this);
                    j+=75;
                 }
              }
        g.drawRoundRect(15,170,390,140,20,10);
        }
        if(numCards==6) {
           j=0;
              for(int i=0; i<5; i++){
                 g.drawImage(cards[hand[k-(numCards-2)+i]],86+j,203,this);
                 j+=60;
              }
        }
        if(numCards==7) {
           j=0;
              for(int i=0; i<6; i++){
                 g.drawImage(cards[hand[k-(numCards-2)+i]],71+j,203,this);
                 j+=51;
              }
        }
        if(numCards==8) {
           j=0;
              for(int i=0; i<7; i++){
                 g.drawImage(cards[hand[k-(numCards-2)+i]],63+j,203,this);
                 j+=44;
              }
        }
       }
       }
     public void doSplitz(){
       Graphics g = pan.getGraphics();
       g.setColor(cloth);
          if(split1){
            if(r==0)g.drawString("OOO ",130,60);
            if(r==1){
               g.fillRect(10,170,400,142);
               g.fillRect(250,12,130,128);
               g.setColor(Color.yellow);
               g.drawRoundRect(15,170,edge1,140,20,10);
               g.drawString("1st HAND "+str,260,30);
               g.drawImage(cards[hand[2]],37,203,this);
               splitter=true;
            }
            if(r==numCards+2){
               g.setColor(Color.yellow);
               g.drawImage(cards[hand[3+numCards]],117,203,this);
               checkResults();
               g.drawString("2nd HAND "+str,37,190);
               numCards=2;
               splitter=false;
            }
            if(r<numCards+2) {
               if(r==2)g.drawImage(cards[hand[1]],253,42,this);
               if(r==3)g.drawImage(cards[hand[3]],253+fin,42,this);
               if(r==4)g.drawImage(cards[hand[4]],253+fin*2,42,this);
               if(r==5)g.drawImage(cards[hand[5]],253+fin*3,42,this);
               if(r==6)g.drawImage(cards[hand[6]],253+fin*4,42,this);
               if(r==7)g.drawImage(cards[hand[7]],253+fin*5,42,this);
               if(r==8)g.drawImage(cards[hand[8]],253+fin*6,42,this);
               if(r==9)g.drawImage(cards[hand[9]],253+fin*7,42,this);
            }
          }
          else{
             if(r==0){
                g.setColor(Color.yellow);
                g.drawString("SPLIT CARD",270,30);
                g.drawRoundRect(240,10,160,140,20,10);  //split area
             }
             if(r==1){
                g.fillRect(115,202,80,100);
                g.drawImage(cards[hand[2]],270,42,this);
             }
             if(r==2){
                g.fillRect(20,175,160,20);
                g.fillRect(110,175,80,20);
                g.drawImage(cards[hand[3]],117,203,this);
                g.setColor(Color.yellow);
                g.drawString("1st HAND  "+str,37,190);
                doButtons();
             }
          }
       }
    
     public void dealerCards(){
          Graphics g = pan.getGraphics();
             if(r==0){
                g.setColor(cloth);
                g.fillRect(35,15,100,20);
                g.fillRect(115,40,90,110);
             }
             if(r==numCards-1){
                g.setColor(Color.yellow);
                g.drawString("DEALER :  "+str,37,30);
                g.drawImage(cards[hand[k]],37+edge2*(numCards-1),42,this);
             money.setEnabled(true);
             Deal.setEnabled(true);
             finalCalc();
             }
             if(r!=numCards-1){
                if(r==1)g.drawImage(cards[hand[k]],37+edge2,42,this);
                if(r==2)g.drawImage(cards[hand[k]],37+edge2*2,42,this);
                if(r==3)g.drawImage(cards[hand[k]],37+edge2*3,42,this);
                if(r==4)g.drawImage(cards[hand[k]],37+edge2*4,42,this);
                if(r==5)g.drawImage(cards[hand[k]],37+edge2*5,42,this);
                if(r==6)g.drawImage(cards[hand[k]],37+edge2*6,42,this);
                if(r==7)g.drawImage(cards[hand[k]],37+edge2*7,42,this);
            }
       }
    
     public int doDeal(int x){
         hasAces=false;
         boolean hasAces2=false;
         int i=1, j=0;
         numCards=1;
         if((vl[0]==1)||(vl[k+i]==1))hasAces=true;
         if(vl[0]>10)fin=10;
         else fin = vl[0];
         if(hasAces)fin+=10;
           do{
             if(vl[k+i]>10)fin+=10;
             else fin += vl[k+i];
             if((hasAces)&&(fin>21)){
                fin -=10;
                hasAces=false;
             }
             if((i!=1)&&(vl[k+i]==1))hasAces2=true;
             if(hasAces2)fin+=10;
             if((hasAces2)&&(fin>21))fin-=10;
             numCards=i+1;
             i++;
           } while (fin<17);
       return numCards;
       }
    
     public int doSpaces(int x){
         if(numCards==2) edge2 =80;
         else edge2 = (int)(80/(numCards-1)+0.5);
         return edge2;
       }
    
      public void checkResults() {
         str="";
         blackjack=jackblack=hasAces=false;
          if(split) {
             vl[1]=vl[2];
             vl[2]=vl[3];
             st[1]=st[2];
             st[2]=st[3];
          }
          else if(splitter){
             vl[2]=vl[k];
             st[2]=st[k];
          }
          else if(finish){
             vl[1]=vl[0];
             vl[2]=vl[k+1];
             st[1]=st[0];
             st[2]=st[k+1];
          }
          else {}
          if(((vl[1]==11)&&((st[1]==0)||(st[1]==3)))||((vl[2]==11)&&((st[2]==0)||(st[2]==3))))jackblack=true;
          if(vl[1]>10)vl[1]=10;
          if(vl[2]>10)vl[2]=10;
          total = vl[1]+vl[2];
          if((vl[0]==1)||(vl[0]>9))  insurance=true;
          if((vl[1]==1)||(vl[2]==1)) hasAces  =true;
          if((hasAces) && (total==11)) blackjack=true;
             if(blackjack){
                if(jackblack)str=" JACKPOT !";
                if((finish)&&(jackblack))str=" TOP DOG !";
                else str=" BLACKJACK";
             }
             else{
                str=Integer.toString(total);
                   if((!splitter)&&(vl[1]==vl[2]))str +=" : Split?";
                   else if((!hasAces)&&(insurance))str += " : Insurance?";
                   else if((hasAces)&&(total<12)) str=" "+total+" or "+(total+10);
                   else str =" "+total+" : Play";
             }
          if(blackjack)total=100;
          if((jackblack)&&(blackjack))total=250;
          if((finish)&&(!blackjack))str=Integer.toString(fin);
       }
    
      public void updateScore(){
             if(vl[k]>10)vl[k]=10;
             total += vl[k];
             if(vl[k]==1) hasAces=true;
             if((hasAces)&&(total<12)) str=" "+total+" or "+(total+10);
             else str = Integer.toString(total);
             if(total>20){
                if(!splitter) setNext();
                if(total!=21) str=Integer.toString(total)+"  BUST!";
             }
       }
    
      public void setNext(){
          for(int i=0;i<5;i++)buts[i].setEnabled(false);
             if(bet!=0){
                buts[3].setLabel("NEXT");
                buts[3].setEnabled(true);
             }
             else Deal.setEnabled(false);
       }
    
      public void doScores(){
          Graphics g = pan.getGraphics();
          g.setColor(cloth);
          g.fillRect(25,15,180,130);
          g.setColor(Color.yellow);
          g.drawString("YOU LOSE: click on deal",37,30);
          Deal.setEnabled(true);
          money.setEnabled(true);
          score=score-bet;
          calc="You lose "+bet;
       repaint();
       }
    
      public void finalCalc(){
          if(fin>21)fin=3;
          int temp1=0, temp2=0;
          if(blackjack)fin=100;
          if((blackjack)&&(jackblack))fin=250;
         // for two cards
            if(splitScore){
                if(fin>total2){
                   temp1 -= bet2;
                   calc="Lose 1st hand";
                }
                if(fin<total2) {
                   if(total2==100) temp1 =bet2*2;
                   else if(total2==250) temp1 =bet2*5;
                   else temp1 +=bet2;
                   calc="Win 1st hand";
                }
                if(fin==total2)calc="Push 1st hand";
                if(fin>total1){
                   temp2 -= bet2;
                   calc+=", lose 2nd";
                }
                else if(fin<total1) {
                   if(total1==100) temp2 =bet*2;
                   else if(total1==250) temp2 =bet*5;
                   else temp2 +=bet;
                   calc+=", win 2nd";
                }
                else calc+=", push 2nd";
             } // end for 2 cards
               // one card only: not split
             else{
                if(fin>total1) temp2 -=bet;
                else if(fin<total1) {
                   if(total1==100) temp2 =bet*2;
                   else if(total1==250) temp2 =bet*5;
                   else temp2 =bet;
                   calc ="You win, place your bet.";
                }
                else winLose="Its a pushhhh...";
             }  // end one card only
             if((blackjack)&&(ins!=0)){
                insure="win "+(ins*3)/2;
                temp2 +=(ins*3)/2;
             }
             if((!blackjack)&&(ins!=0)){
                insure="lose "+ins;
                temp2 -=ins;
             }
            // final tallies: !=lose
             if(temp1 + temp2 < 0){
                if(!splitScore){
                   calc = "Sorry you lose "+((temp1 + temp2)*-1);
                   winLose=" L O O Z E R !!";
                }
                else winLose=" L O S E -  "+(temp1 + temp2)*-1;
                score += (temp1 + temp2);
                repaint();
             }
            // 2: no win no loss
             else if(temp1 + temp2==0){
                if(!splitScore)calc = "Honours are even!";
                winLose="NOTHING GAINED";
                repaint();
             }
            // 3: else its a win
             else{
                score+=temp1 + temp2;
                winLose=" Y O U  W I N   "+(temp1 + temp2);
                repaint();
             }
         }
    
       public void doButtons(){
          if(!blackjack){
             buts[0].setEnabled(true);
             buts[1].setEnabled(true);
          }
          money.setEnabled(false);
          if(insurance){
                buts[4].setEnabled(true);
                money.setEnabled(true);
             }
             else buts[4].setEnabled(false);
          if((blackjack)&&(!splitter))setNext();
          else if((k==2)||(splitScore)) if(vl[1]==vl[2])buts[3].setEnabled(true);
          else buts[3].setEnabled(false);
          if(splitter){
             buts[3].setLabel("SPLIT");
             buts[3].setEnabled(false);
             buts[0].setEnabled(true);
          }
          if((!blackjack)&&((vl[1]+vl[2]<12)||(total<12))) buts[2].setEnabled(true);
             else buts[2].setEnabled(false);
       }
    
       public void paint(Graphics g) {
          g.setColor(Color.white);
          g.drawString(calc,450,120);
          g.drawString(insure,530,328);
          if(splitter)g.drawString(" "+bet2,550,280);
          else g.drawString(" "+bet,550,280);
          g.drawRect(485,44,65,50);
          g.drawRect(487,46,61,46);
          g.drawRect(537,240,50,50);
          g.drawRect(539,242,46,46);
          g.drawString('\u00A9'+" S. Scott 2003",515,348);
          g.setFont(f2);
          g.drawString("SCORE:",494,62);
          g.drawString(""+score,500,84);
          g.drawString("BET",549,260);
          g.drawString(winLose,455,30);
       } // end paint
    
       public void actionPerformed(ActionEvent e) {
          String com = e.getActionCommand();
          if(com.equals("DEAL THE CARDS")) {
             shuffle();
             if(score>0)doCards = true;
             Deal.setEnabled(false);
             bet=money.getSelectedIndex()+1;
             checkResults();
             doButtons();
                if(bet>score)bet=score;
                if(bet==0){
                   winLose="Game Over Sucker";
                   calc="You have no money";
                   setNext();
                }
          }
    
           if((com.equals("DRAW"))||(com.equals("BUY"))) {
             drawCard=true;
             numCards++;
             edge1+=80;
             k++;
             updateScore();
             if((splitter)&&(total>20)) setNext();
                if(com.equals("BUY")){
                   if(splitter){
                      if(score-bet>bet){
                         bet2*=2;
                         calc="Ride 'em cowboy !!!";
                      }
                      else calc="Ahh, ah, ah!!!";
                   }
                   if(!splitter){
                      if(score-bet>bet){
                         bet*=2;
                         calc="OK, double-down "+bet/2;
                      }
                      else calc="No money for that";
                   }
                deal();
                setNext();
                }
                else deal();
             buts[4].setEnabled(false);
             buts[2].setEnabled(false);
          }
    
           if(com.equals("SPLIT")) {
             if(score-bet>bet){
                bet2=bet;
                r=0;
                k++;
                doSplitz();
                split=splitter=splitScore=true;
                buts[3].setLabel("NEXT");
                checkResults();
             }
             else calc="No money to split";
          }
          if((com.equals("NEXT"))||(com.equals("KEEP"))){
            if(splitter){
                r=0;
                edge1=200;
                  if(!blackjack) {
                     if((hasAces)&&(total<12))total +=10;
                     if(total>21)total=2;
                   }
                total2=total;
                getParam(fin);
                split1=true;
                   if(split1)k+=2;
                drawCard=false;
                doButtons();
             }
             else {
                for(int i=0;i<5;i++)buts[i].setEnabled(false);
                  if(k==2)checkResults();
                  if(!blackjack) {
                     if((hasAces)&&(total<12))total +=10;
                     if(total>21)total=2;
                   }
                total1=total;
                r=0;
                if((total1==2)&&(total2==0)&&(ins==0))doScores();
                else{
                   doDeal(numCards);
                   doSpaces(edge2);
                   finish=dealer=true;
                   checkResults();
               }
             }
          }
          if(com.equals("Insurance")){
             if(score-bet-bet2>money.getSelectedIndex()+1){
                ins+=money.getSelectedIndex()+1;
                insure="paid "+ins;
             }
             else insure="can't do it";
             money.setEnabled(false);
             buts[4].setEnabled(false);
          }
       repaint();
       }
    }

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    It's an applet, so it will say you have no main if you try to run it not as an applet, but as a stand-alone class. By the way, isn't this double posted in your other thread? Which thread is going to be the active thread? And where did you find this code?

  3. #3
    mrajan's Avatar
    mrajan is offline Member
    Join Date
    Jun 2010
    Posts
    12
    Rep Power
    0

    Default

    i was going to end or delete the other post... i like this code better i think atleast i like screen shot of this blackjack... i got this from planetsourcecode.com...

    so how can i run this

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,616
    Rep Power
    25

    Default

    First you have to compile it.
    Then create an html file with the <APPLET tag pointing to it
    Then load the html file in a java enabled browser
    Last edited by Norm; 07-02-2010 at 05:16 AM.

  5. #5
    mrajan's Avatar
    mrajan is offline Member
    Join Date
    Jun 2010
    Posts
    12
    Rep Power
    0

    Default

    it works... but have a problem... i cant see the cad images when i play... and i have card images in my document folder

  6. #6
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

  7. #7
    mrajan's Avatar
    mrajan is offline Member
    Join Date
    Jun 2010
    Posts
    12
    Rep Power
    0

    Default

    it's a source code i found at planetsourcecode.com... it works n all... only thing is there no image of the cards and i have card images in my document folder... im editting it... but i dont know where the image upload goes...

  8. #8
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,120
    Rep Power
    20

    Default

    Considering the OP has grabbed a chunk of code off the web for a project, and presumably is planning on handing this in as their own work...well...I think you can get what I'm getting at.

  9. #9
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

  10. #10
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,679
    Blog Entries
    7
    Rep Power
    21

    Default

    Quote Originally Posted by Fubarable View Post
    Yeah, I pray he never works with me.
    Welcome to the new generation of programmers: programmers that really depend on the internet where they scavenge, copy and paste their code, largely not-understood but glued together to 'their' latest program. We don't live in the age of Edsger W. Dikstra anymore (he's dead anyway) or Donald Knuth (he's not quite dead yet) but we live in the age of Google that isn't consulted as much as it should be because it involves the ancient act of 'reading'; an act that makes your eyballs bleed (or so the story says). Wtf, the OP found the code on the net so it should run; otherwise its our fault.

    kind regards,

    Jos ;-)

  11. #11
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,120
    Rep Power
    20

    Default

    Hey, I scavenge!
    I consider it a fine art that every programmer should know...

    But at least I know what I'm looking for, and what it is I'm looking at...and whether it looks like rubbish. And that's the art part.

  12. #12
    mrajan's Avatar
    mrajan is offline Member
    Join Date
    Jun 2010
    Posts
    12
    Rep Power
    0

    Default

    how do you guys expect us to learn to do a program like this in 6 weeks... we all blame the professor for the way he taught us... i think i would have learned java better if i had a better professor...

    please can u guys show me what my error is... this is due tomorrow @ 12pm... please i need your help

  13. #13
    curmudgeon is offline Senior Member
    Join Date
    May 2010
    Posts
    436
    Rep Power
    5

    Default

    I think your problem is two fold:
    1) blaming the professor on what is ultimately your responsibility, and
    2) waiting to the last minute to complete a complex project, trying to get by with borrowed code and then wondering why it won't work when you don't understand the code.

    Some cold hard advice: you should accept the grade you deserve and next time invest more time and effort into learning what you need to learn to pass.

  14. #14
    mine0926 is offline Senior Member
    Join Date
    Apr 2010
    Location
    Philippines
    Posts
    580
    Rep Power
    5

    Default

    At least your professor taught you... mine did not. But I dont blame him cause I learn how to self study.. Yes. I ask questions here in this forums that I know that should be basic and should be learn at school but you cannot learn with just blaming your professor, copy someones' code without even giving time how he/she did it and asking someone to debug it for you. It's already happening and all you can do is to stand for yourself and do your homework.

    We are willing to help you if we could just see some effort from you.

    mates: sorry for my bad english and for being "dramatic" here. :)
    Last edited by mine0926; 07-03-2010 at 06:56 AM.

  15. #15
    whoelse is offline Newbies
    Join Date
    May 2011
    Posts
    1
    Rep Power
    0

    Default

    I am looking at this code and i cannot figure out whats the
    int []st = new int[30];
    int []vl = new int[30];

    used for...

Similar Threads

  1. Java Error Class Help !!
    By rons_sacramental in forum New To Java
    Replies: 2
    Last Post: 05-10-2010, 03:42 AM
  2. class not enabled error ?????
    By koxy in forum Advanced Java
    Replies: 2
    Last Post: 04-02-2010, 03:58 PM
  3. Class Expected error
    By Radman23 in forum New To Java
    Replies: 11
    Last Post: 01-14-2009, 05:12 AM
  4. Bean class error
    By impact in forum Java Servlet
    Replies: 5
    Last Post: 08-16-2008, 04:46 PM
  5. Error in class
    By ai_2007 in forum Advanced Java
    Replies: 1
    Last Post: 07-09-2007, 05:06 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •