Home Discussion Discuss: Java error illegal start of type

  • problem please help illegal start of type.....Rithvik Mandal July 14, 2013 at 3:54 PM

    import java.io.*; class mobile1 { public static void main()throws IOException; BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); { System.out.println("CHOICE ANY ONE"); System.out.println("1.CALLING"); System.out.println("2.MESSEGING"); i=Integer.parseInt(br.readLine()); } switch(i) { case 1:BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); System.out.println("ENTER 10 DIGITS NUMBER"); int i = Integer.parseInt(br.readLine); system.out.println("calling now....."); system.out.println("IT COST YOU 2 MIN"); break; case 2:BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); System.out.println("ENTER text"); int i = Integer.parseInt(br.readLine); system.out.println("sending"); system.out.println("IT COST YOU 1 RUPPEES"); break; } } }

Post your Comment



Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Related Articles
Java Beginners

illegal start of type
illegal start of type  Hi, This is my code i m getting illegal start of type as error when i m compiling it,can anyone pls help me to correct this error. public class WriteByteArrayToFile { public static void main(String 

Java Beginners

illegal start type, HELP!
is " + shipping + " dollars."); } } } Illegal start type error? help?   ...illegal start type, HELP!  import java.util.Scanner; public class... keyboard = new Scanner(System.in); System.out.print("Please type the total number 

Java Beginners

Illegal Start of Type
Illegal Start of Type  Hello! I'm very new to writing java. And I keep getting the "Illegal Start of Type" error. I've tried everything to fix...,"North"); // building interface for room type=new JLabel("Type: "); roomno=new 

Java Beginners

illegal start of type
illegal start of type  Hello! I'm very new to writing java. And I keep getting the "Illegal Start of Type" error. I've tried everything to fix... for room type=new JLabel("Type: "); roomno=new JLabel("roomNo 

General

Java error illegal start of type
Java error illegal start of type       The Java error illegal start of type...;} } On Compilation the code show an illegal start of type error. Output 

JSP Servlet Questions

illegal start of expression in servlet error..
illegal start of expression in servlet error..  hello Sir, here is my servlet code and i am getting illegal start of expression error in declaring the method named " public Boolean ModificarUsuario(int IdUsuario 

Framework Questions

i got illegal start of expression error , plese tell me the mistake where i did...
i got illegal start of expression error , plese tell me the mistake where i did...   import org.springframework.context.*; import java.util.*; public class MyListener implements ApplicationListener { public static void main 

Java Beginners

illegal start of expression - Java Beginners
illegal start of expression  here i attach my program.. which shows illgal start of expression.. plz aynone will silve this particular problem.. and correct this particular program.. plz help me 

Java Beginners

Java error
= 88; while(a } //it is giving compile time error .....illegal start of type...Java error  class WhileLoopMethod{ public static void main(String 

Java Beginners

Java error
= 88; while(a } //it is giving compile time error .....illegal start of type...Java error  class WhileLoopMethod{ public static void main(String 

JSP Servlet Questions

error within servlet
error within servlet  List leagueList=(List).context.getAttribute("leagueList"); this is one line in my servlet code. but i have error with this line. The error is.... illegal start of type. Cannot find symbol. Symbol:variable 

Java Beginners

incompatble type error
); } } } trows incampatble type error...incompatble type error  class ArithmeticExceptiontest { public static void main(String args[]) { int num1 = 0; int num2=10 

Java Beginners

Swing error in code
() { ^ SClient.java:29: error: illegal start of type b.addActionListener(new...() { ^ SClient.java:29: error: illegal start of type...Swing error in code  import java.rmi.*; import java.awt.*; import 

Java Beginners

Explain about threads:how to start program in threads?
Explain about threads:how to start program in threads?  import... to type something and show date and time simultaneously you can use threads... and print it simultaneously. Threads are called light weight processes. Every java 

Struts Questions

tomcat server start up error - Struts
org.apache.catalina.core.StandardContext start SEVERE: Error getConfigured Sep 5, 2009 4:49:09 AM...tomcat server start up error   Hai friends..... while running... on the java.library.path: C:\Program Files\Java\jre6\bin;.;C:\WINDOWS\Sun\Java\bin;C 

EJB Questions

could not start server. - EJB
5.5.1 and sun java Application server 9.2 to run ejb program. But when I start server by right clicking on sun java app. server in Run Time window an error comes ---sun java server could not start. so what should I do to start this server 

Applet Questions

java compilation error - Applet
; } } Error is: Illegal start of expression Plz. find why am I getting this error...java compilation error  I am getting compilation error in the following code.: public void paint(Graphics g) { switch(screen 

Java Server Faces Questions

apache tomcat start error - Java Server Faces Questions
apache tomcat start error  Hi sir,While starting tomcat services i am getting this error so please give me solution and i am using windows 7 operating system ERROR:- Windows could not start the Apache Tomcat 6 on Local 

JavaScript Questions

error
of framework used and also the JDK version. This type error also comes when java file is complied in old version of java and used on latest version. Thanks 

General

Java Illegal State Exception
Java Illegal State Exception   ... of exception. while some other classes are checked. Java Illegal State Exception... Exception with Example In this example we want to show you the java illegal state 

Struts Questions

error
error  The content of element type "struts" must match "(package|include|bean|constant 

IDE Questions

Tomcat start up issue: SEVERE: Error listenerStart - IDE Questions
Tomcat start up issue: SEVERE: Error listenerStart   Hi When I... the following issue and I am not able to access my application. SEVERE: Error listenerStart Dec 5, 2007 10:24:10 AM org.apache.catalina.core.StandardContext start 

Java Beginners

Array list in Java - arraylist type error
Array list in Java - arraylist type error  I am using Array list in Java but when i compile i get array list type error. Can anyone please explain what is array list type error and why it occurs 

JDBC Questions

type mismatch
type mismatch  Statement s= con.createStatement(); this line gives error of "type mismatch" I am using eclips nd new to servlet nd JDBC, Please help me, Thank you 

JDBC Questions

data type used to store name.(getting an error)
data type used to store name.(getting an error)    Statement stm=con.createStatement(); String query="select * from employee where ename... getting an error like dis: "ename cannot be resolved to a variable" whats 

Struts 2 Tutorials

Subset Tag (Control Tags) Example Using Start
the start parameter. The start parameter is of integer type. It indicates... a subset of it. The parameter start is of integer type and it indicates...Subset Tag (Control Tags) Example Using Start    

Java Beginners

Java Error In comapitable Type in statement - Java Beginners
Java Error In comapitable Type in statement  Here I want to Check...(j1,"Error in submitting data!"); }//end catch }// end Action...(Exception e){ JOptionPane.showMessageDialog(j1,"Error in submitting data 

Struts 2 Tutorials

Type conversion example
Type Conversion Example An example of type conversion is given below, which...;style type="text/css">@import url(css/main.css);</style> <... can make properties file for proper error message as. This properties file must 

Programming Tutorials

Java Web Start and Java Plug-in
extension and mime type associations with Java Web Start application, you can... Java Web Start Enhancements in version 6  ... Java Web Start should check for updates on the web, and what to do when 

Java Server Faces Questions

Tomcat start up issue: SEVERE: Error listenerStart - Java Server Faces Questions
Tomcat start up issue: SEVERE: Error listenerStart    Hi... the following issue and I am not able to access my application. SEVERE: Error... start SEVERE: Context [/myApp] startup failed due to previous errors How 

DMCA.com