hi,
 
well You have a class point but not a constructor point!.
Why , Your "constructor" point (int a,int b)is not a Constructor but a
method,because you have an void in front of it,
Construtor dont have a void or int etc....
If you want to run this change your void point (....) in public
point(.....) and it should work...
 
sandro
 

________________________________

Von: [email protected]
[mailto:[email protected]] Im Auftrag von
prasad jedhe
Gesendet: Montag, 2. Februar 2009 10:00
An: [email protected]
Betreff: [java programming] need help


>> i have written this code & am getting an error at line 5 as "cannot
find symbol ;symbol :constructor point(int,int )" 

public class Main                                //line 1
{                                                        //line 2
    public static void main(String[] args) //line 3
    {                                                   //line 4
      point p1 = new point(5,6);             //line 5<< giving error at
this line
      p1.print();      
    }
    
}
class point
{
    private int x=0;
    private int y=0;
void point(int a,int b)
    {
       
        this.x=a;
        this.y=b;
    }
    void print()
    {
        System.out.println("Value of x: "+x+ " Value of y:"+y);
        System.out.println("-------------------------------");
    }
}




#####################################################################################
SEB AG          
Hauptsitz               
Frankfurt am Main                                               
HRB 6800
                                                        
Vorsitzender des Aufsichtsrates: Fredrik Boheman

Vorstand: Peter Buschbeck, Vorsitzender
Wolfgang Argelander
Renate Bloß-Barkowski
Liselotte Hjorth
Ian Lees
Jan Sinclair

#####################################################################################
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen.
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten 
haben, informieren Sie bitte sofort den Absender und vernichten Sie diese 
E-Mail (inklusive aller Anhänge).
Bitte fertigen Sie keine Kopien an oder bringen den Inhalt anderen Personen zur 
Kenntnis.
E-Mails sind anfällig für Datenverfälschungen, können abgefangen werden und 
Computerviren verbreiten.
Außer für Vorsatz und grobe Fahrlässigkeit lehnen wir jede Verantwortung für 
derartige Vorgänge ab.

This e-mail is confidential and may contain legally privileged information. 
If you have received it by mistake, please inform us by reply e-mail and then 
delete it (including any attachments) from your system.
You should not copy it or in any other way disclose its content to anyone.
E-mail is susceptible to data corruption, interception, unauthorised amendment, 
tampering and virus infection.
We do not accept liability for such actions or the consequences thereof.
#####################################################################################

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to