Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Whts Wrong With It
Index -> Programming, Java -> Java Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
ankush




PostPosted: Mon Feb 23, 2009 1:04 am   Post subject: Whts Wrong With It

Java:
import java.io.*;
class addno
{
    public static void main;(String[]args);
    {
        int nu1,nu2,yu;
        InputStreamReader isr=new InputStreamReader(System.in);
        BufferedReader br= new BufferedReader(isr);
        System.out.println("f");
        String Str1=br.readLine ();
        nu1=Integer.parseInt(Str1);
               System.out.println("f");
        String Str2=br.readLine();
        nu2=Integer.parseInt(Str2);
        yu=nu1+nu2;
   
   
        System.out.println("jkj"+yu);
    }

   
   
}



Mod Edit: Remember to use syntax tags! Thanks Smile
code:
[syntax="java"]Code Here[/syntax]
Sponsor
Sponsor
Sponsor
sponsor
DemonWasp




PostPosted: Mon Feb 23, 2009 1:25 am   Post subject: RE:Whts Wrong With It

I don't know what's wrong with it. What's it supposed to do, and what does it do?

You need to provide us with some context for the problem you're running into. Also, please don't forget to use either [ code ] your code here [ / code ] or [ syntax = " language " ] your code here [ / syntax ].
Dan




PostPosted: Mon Feb 23, 2009 1:25 am   Post subject: RE:Whts Wrong With It

Well the first thing that jumps out at me is that you have two ';'s in "public static void main;(String[]args);" that should not be there.

Method definitions don't need any in that line.


The other big thing that jumps out at me is your formating or lack there of. Try using the [code] or [syntax] tags when posting code. Also when you post questions they should be more then just a subject and code pasted in. You should at least say what errors you are getting and what you are trying to do.

Also your variable names are horrible and nonsensical.


P.S. I hope this is a program you are working on and not some kind of homework question asking what is wrong with a block of code.
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
Display posts from previous:   
   Index -> Programming, Java -> Java Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: