2 Replies Latest reply on Sep 9, 2009 2:51 PM by 843798

    "con" creading  problem n compilation in Windows

    843798
      when we comile the following program in windows it creates sound and does print some character
      *****************************************************************************

      import java.io.*;
      class con
      {
      double a,i,j;
      int k;
      con(double i)
      {
      this.i=i;
      }
      public double area(double r)
      {
      a=3.14*r*r;
      return a;
      }
      void display()
      {
      System.out.println("Area= "+a);
      }
      }
      class construc
      {
      public static void main(String args[])
      {
      con c1=new con(2.59);
      double a1=c1.area(2.59);
      c1.display();
      }
      }
      ***************************************************************************
      On the basis of discussion the reason I found was
      what I think that it is due to Compiler parsing problem.. I hope java Lexical Analyzer finds no problem in written code to be parsed and directed by instances of regular expressions in the input stream but when YAAC tries to generate subroutine it fails as it cant crate valid codes for con( and cant create a con.class file).. giving BIOS beep sound
      ..
      Now when I replaced con with LPT1 it further stopped even compilation and stood idle.. ho I hope its is bcause of this reason.
      Further in discussion
      By Raj told us
      When SDK tries to write into con.class, SDK creates a stream to write into con. (CON IS CONSOLE) so, The class file gets printed into the console.!
      And while printing in the console, the character corresponding to ascii value 7 makes a bep noise. Thats all !
      If it helps any better, Try it in linux, There'll be no problem. con.class will be perfectly created.No bugs with SDK
      **********************************************************************************************************************
      But what I feel java being a platform independent language should behave same evey \where regardless of being LINUX or WINDOWS so I still feel LEX and YAAC ans a part of compiler should handle it in a better way and should raise and issue when compiled.
      If JAVA developer have any good reson to clarify it pl

      The problem was is actually posted in orkut forum by
      ☠ ♛ ☠ D☪☪P☂☥
      http://www.orkut.co.in/Main#Profile?uid=14610368948132281858
      we have been discussing it in threads there
      http://www.orkut.co.in/Main#CommMsgs?cmm=1448445&tid=5378114763870191912&start=1
      and
      http://www.orkut.co.in/Main#CommMsgs?cmm=589&tid=5375718777709412648