2 Replies Latest reply: Sep 9, 2009 9:51 AM by 843798 RSS

    "con" creading  problem n compilation in Windows

      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)
      public double area(double 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);
      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☂☥
      we have been discussing it in threads there