result after compilation

result after compilation

public class MainCls { public static void main(String argv) { System.out.println("My text"); } }

View Answers

July 11, 2011 at 12:08 PM

The above code gives following error:

java.lang.NoSuchMethodError: main

This error occurs because you haven't specify string array in main method.

We have corrected your code:

public class MainCls {
    public static void main(String []argv) { 
        System.out.println("My text");
        }
        }

It gives following output:

My text









Related Tutorials/Questions & Answers:
result after compilation
result after compilation  public class MainCls { public static void main(String argv) { System.out.println("My text
java compilation error - Hibernate
).By that only this exeptions rise dude..Try it and give your result after...java compilation error  hi, i have made an registration page whosevalues should be inserted into database. i have used hibernate and eclipse
Advertisements
compilation problem
compilation problem  struts 2.0 : i have included all 5 jars in lib folder,but its giving compilation problem that package open symphony doesnot exist ( though i imported it) & cant recognise SUCCESS etc symbol.i think i
compilation problem
compilation problem  struts 2.0 : i have included all 5 jars in lib folder,but its giving compilation problem that package open symphony doesnot exist ( though i imported it) & cant recognise SUCCESS etc symbol.i think i
Webshpere compilation error
Webshpere compilation error   I want clear result . Thank you WSWS3166E: Error: No client transport named 'http' found. faultActor: null faultDetail: [10/5/10 13:19:40:937 EDT] 00000043 SystemOut O WSWS3166E: Error
compilation fail
compilation fail  package jsptube.tutorials.servletexample; import javax.servlet.GenericServlet; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import java.io.IOException; import
java Compilation
java program compilation time following error is occur in my system Note
java Compilation
java program compilation time following error is occur in my system Note
java Compilation
java program compilation time following error is occur in my system Note
compilation error
compilation error  Hi my program below is not compiling,when I try to compile it i'm getting the error message "tool completed with exit code 1".The loop has to be at the end of the program can you help me. Blockquoteimport
compilation errors
compilation errors  package jsptube.tutorials.servletexample; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletConfig; import javax.servlet.ServletException; import
display result
display result  i want a code that takes input from user through dropdown box and display the result into table.all the values regarding the user input must be displayed. i am using mysql database   hi i want study
ModuleNotFoundError: No module named 'result'
: pip install result After the installation of result python library...ModuleNotFoundError: No module named 'result'  Hi, My Python... 'result' How to remove the ModuleNotFoundError: No module named 'result'
result problem
result problem  sir,i have written program given below but that program is not giving proper output.pls help me import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import java.sql.*;ADS_TO_REPLACE_1 class
compilation error - Java Beginners
compilation error  class s { public static...; //Hexadecimal number System.out.println("Value = 10(10): result ="+a); System.out.println("Value = 8(8*1+8*0): result ="+b); System.out.println("Value
compilation errors - Swing AWT
compilation errors  how to create a window with five textFields, five labels and three buttons
"compilation error " & "throw an exception" - Java Beginners
. Will result in compilation error c. Will return the number of rows retrieved from..."compilation error " & "throw an exception"  Hello. I have a question here: Statement sql2 = con.createStatement(); int result
java compilation error - Applet
java compilation error  I am getting compilation error in the following code.: public void paint(Graphics g) { switch(screen) { case 0: g.drawString(line1,2,10); break; case 1
java compilation error - Hibernate
java compilation error  hi i am getting org.hibernate.exception.GenericJDBCException: Cannot open connection exception when runnig the code why this exception is coming
groovy compilation error - Framework
groovy compilation error  while i am running the grails application , i got the error message like: [groovyc...] [groovyc] 1 error Compilation error: Compilation Failed how we can resolve
jdbc compilation error - JDBC
jdbc compilation error  java.lang.Exception: Problem in call_select when i am executing the program i am getting the above error. how can i resolve it?  Hi friend, plz specify in detail and send me code
Java compilation error - Java Beginners
Java compilation error  Method overridden problems in compile time error
ModuleNotFoundError: No module named 'cdumay-result'
with following command: pip install cdumay-result After...ModuleNotFoundError: No module named 'cdumay-result'  Hi, My... 'cdumay-result' How to remove the ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'result_py'
command: pip install result_py After the installation of result_py...ModuleNotFoundError: No module named 'result_py'  Hi, My Python... 'result_py' How to remove the ModuleNotFoundError: No module named 'result
ModuleNotFoundError: No module named 'result-quality'
python with following command: pip install result-quality After...ModuleNotFoundError: No module named 'result-quality'  Hi, My... named 'result-quality' How to remove the ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'thumbor_no_result'
After the installation of thumbor_no_result python library, ModuleNotFoundError...ModuleNotFoundError: No module named 'thumbor_no_result'  Hi, My... named 'thumbor_no_result' How to remove the ModuleNotFoundError: No module
ModuleNotFoundError: No module named 'typed-result'
with following command: pip install typed-result After the installation...ModuleNotFoundError: No module named 'typed-result'  Hi, My Python... 'typed-result' How to remove the ModuleNotFoundError: No module named '
ModuleNotFoundError: No module named 'cdumay-result'
with following command: pip install cdumay-result After...ModuleNotFoundError: No module named 'cdumay-result'  Hi, My... 'cdumay-result' How to remove the ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'deferred-result'
python with following command: pip install deferred-result After...ModuleNotFoundError: No module named 'deferred-result'  Hi, My... named 'deferred-result' How to remove the ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'grep-result'
with following command: pip install grep-result After the installation of grep...ModuleNotFoundError: No module named 'grep-result'  Hi, My Python... 'grep-result' How to remove the ModuleNotFoundError: No module named '
java compilation error,Struts2 - Struts
java compilation error,Struts2  hi, From last 3 days i m trying for image uploading through struts2 by taking the reference of file upload sample code from roseindia.net site,But i m unable to insert it into database,its
java compilation error - Applet
java compilation error  hi friends the following is the awt front design program error, give me the replay E:\ramesh>javac product.java Note: product.java uses or overrides a deprecated API. Note
Java Compilation error - SQL
Java Compilation error  ava.lang.NullPointerException at beanUtils.SaleHeaderUtility.getFullRemainPatientList(SaleHeaderUtility.java:754) at forms.ProcessDialog.updatePatientBalances(ProcessDialog.java:119
compilation error - Java Beginners
compilation error  sir what is the error inthis code after executing the below code i got java.lang.NoSuchMethodError: main Exception in thread "main" package org.array; import java.io.*; public class Employee
compilation error - Java Beginners
compilation error  Dear sir, When i compile some pgms i am getting below error.what may be the reason? "uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details."  Hi Friend
java compilation error - Ant
java compilation error  hi, i have a application in which i m reading from an xml file and then storing its values in database.but when i started using ant its main program is not running as it is unable to detect the jar file
command prompt is compilation is not working
command prompt is compilation is not working   Dear java users can anyone help me to run the program in command line prompt i tried by selecting the environment variable and class path and path in my system my program
java compilation - Java Beginners
); System.out.println("College/University " + college); } } For compilation : c:\>
compilation error - Java Beginners
compilation error  i 'm not able to compile a program : prblem is there is one package in which 2 class person & dog reside. both classes r public still i'm not able to make object of Dog clss in Person class!! plezz help 
compilation error - Java Beginners
compilation error   import java.awt.*; import java.awt.event.*; import javax.swing.*; class BLayout implements ActionListener { JFrame f ; JPanel jp; JButton b[]; CardLayout cl; BLayout(String s) { jp = new JPanel
Compilation Error - Struts
Compilation Error  description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: Failed to load or instantiate TagExtraInfo class
java compilation error - Java Beginners
java compilation error  Dear Sir ........ I was installed the java soft ware in PC by following your guidelines only, after installing I'm writing my code through command line instead of a note pad but while compiling I'm
compilation error - JSP-Servlet
compilation error  Hi sir, i'm using following code to upload an image to the database.I'm facing the following problem. <% String contentType = request.getContentType(); if ((contentType != null
java compilation error - JDBC
java compilation error   /* *Project:employee.java *Date:April 04,2007. *Purpose:To All Java Developers **/ package employee; import javax.swing.*; import java.awt.*; import javax.swing.border.
Java Compilation - Java Beginners
(using for loop, while loop, and do while loop). The loops should result
Java Compilation - Java Beginners
(using for loop, while loop, and do while loop). The loops should result
java compilation error - JSP-Servlet
java compilation error  i want to do client side validations using JSP, so please can u suggest me a way out.thanq very much for the previous answers... will find the result of ur validation  Hi friend, For client side
hide and show result in jsp
hide and show result in jsp  what codes do i have to change to make my result display if only i enter the correct value? suppose if i click search,then the result will be display at the bottom.. if not.. only the header
Result=Set - Java Beginners
Result=Set  Hi Friend, Can u tell how to get the count of records. in a select operation like sqlstmt="SELECT * FROM search_log_tab WHERE... result set, first move the pointer from first record to last record and get
java compilation error - Java Beginners
java compilation error  Hello madam/sir, i m a beginners in java. My problem is that i want to connect a login form to a frame containing 4 panels. how could i do it?Please help

Ads