Prepare for your Next Interview
|
Welcome to the Geeks Talk forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
This is a discussion on Tell me the error within the Java forums, part of the Software Development category; class input { public static void main(String args[]); Throws IOException; { int i; String str; BufferReaderbr=newBufferReader(newInputstreamReader(System.in)); System.out.println("enter name"); str = br.Readline() System.out.println(str); }...
|
|||||||
|
|||
|
class input
{ public static void main(String args[]); Throws IOException; { int i; String str; BufferReaderbr=newBufferReader(newInputstreamReader(System.in)); System.out.println("enter name"); str = br.Readline() System.out.println(str); } |
| The Following User Says Thank You to soniyaparjapat For This Useful Post: | ||
| Sponsored Links |
|
|||
|
Re: Tell me the error
import java.io.*;
import java.util.*; class input { public static void main(String args[]) throws IOException { //int i; String str; BufferedReader br= new BufferedReader(new InputStreamReader(System.in)); System.out.println("enter name"); str = br.readLine() System.out.println(str); } } |
| The Following User Says Thank You to navaneetha4ever For This Useful Post: | ||
|
|||
|
Re: Tell me the error
the main should not end with semicolon...
class input { public static void main(String args[]) Throws IOException; { int i; String str; BufferReaderbr=newBufferReader(newInputstreamReader(System.in)); System.out.println("enter name"); str = br.Readline() System.out.println(str); } } the above will work.,... |
| The Following User Says Thank You to venkatSeeni For This Useful Post: | ||
|
|||
|
Re: Tell me the error
venkant seeni
there was multiple error in ur progam like BufferReder wil be BufferedReder in Throws T remains small t........ in Readline R remains small r....... and there will be a ; after readline()........ |
|
|||
|
Re: Tell me the error
first of dear u have to import the class file then see the semicolan u place at wrong side...
see the program.....that wiill work i am not shour....ok dont panic..... import java.io.*; import java.util.*; class Input { public static void main(String args[]) Thorws Exception; // int i ; ' will not come because i not in use' String str; BufferReader br = newBufferReader(newInputstreamReader(System.in)); System.out.println("enter name"); str = br.Readline(); // here wii come semicolon System.out.println(str); } |
|
|||
|
Re: Tell me the error
ur program has error
in java we always start method name with small letter but u have declare with capital letter str=br.ReadLine();// this is incorrect str=br.readLine();// right way ok thanks public static void main(String arg[])throws IOException{ right way to declare main method Last edited by AATIQ; 02-09-2009 at 01:16 AM. |
|
|||
|
Re: Tell me the error
import java.io.*;
class input { public static void main(String args[]) throws IOException { int i; String str; BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); System.out.println("enter name"); str = br.readLine(); System.out.println(str); } } |
|
|||
|
Re: Tell me the error
import java.io.*;
class input { public static void main(String args[])throws Exception { int i; String str; BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); System.out.println("enter name"); str = br.readLine(); System.out.println(str); } } Thats all |
|
|||
|
Re: Tell me the error
import java.io.*;
class input { public static void main(String args[])throws Exception { int i; String str; BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); System.out.println("enter name"); str = br.readLine(); System.out.println(str); } } |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| while creating a new domain error message is displayed <Unexpected Error> | zubi_ste | Test Director | 1 | 10-16-2009 08:35 AM |
| Error -26612: HTTP Status-Code=500 (Internal Server Error) | jasmine22 | LoadRunner | 4 | 11-18-2008 06:26 AM |
| Error: Internal error in agent - Function never returned a value | sajithkutty | SilkTest | 6 | 06-02-2008 05:05 AM |
| Getting error "syntax error in ObjectRepository" | siteuse | QTP | 1 | 07-05-2007 04:57 PM |
| Report Net on XP gives error, Cryptographic error has occured | chandrabhoopathy1 | Data Warehousing | 0 | 05-24-2007 07:07 PM |