savitha
it possible or not
1 Answer(s)      2 years and 8 months ago
Posted in : Java Interview Questions

without public static void main(string args[]) in java program it is possible or not?

View Answers

October 30, 2010 at 7:36 PM


Hi,

Here is simple example of Hello World in Java.

public class  HelloWorld
{
    public static void main(String[] args) 
    {
        System.out.println("Hello World!");
    }
}

This is the first program in Java.

In Java The public static void main(String[] args) method is very important. This method is the entry point and JVM executes this method.

If this method is not present you program won't execute.

Without public static void main(String[] args) method you can write Java program and compile. The compiler will generate the class file, but you won't be able to execute from the command line.

Read at Hello world Program in Java.

Thanks









Related Pages:
it possible or not
it possible or not  without public static void main(string args[]) in java program it is possible
Is it possible in SWT ?
Is it possible in SWT ?  I want drop down like google search (ie, when we type one letter then the word start with that are displayed). when the drop down list appear, then we can select one of word as our text box value. Can i
JSP-parameters possible ways
JSP-parameters possible ways  In a JSP program called books.jsp, the Java code out.print(request.getParameter(â??numberâ??)); displays â??1111111â??. What are the ways for the parameter number to have got its value
JSP-parameters possible ways
JSP-parameters possible ways  In a JSP program called books.jsp, the Java code out.print(request.getParameter(â??numberâ??)); displays â??1111111â??. What are the ways for the parameter number to have got its value
possible loss of precision
possible loss of precision  { int amount=(int)depositAmount; switch (depositAmount) { case(depositAmount<=depAmount1... is" +intrest); } i have possible loss of precision as my error
possible loss of precision error
possible loss of precision error  how do i fix this error " possible loss of precision found int required char ch = input.read()" this is the code import java.io.InputStreamReader; import java.io.IOException; class Test1
Hi Friend..IS IT POSSIBLE? - Java Beginners
Hi Friend..IS IT POSSIBLE?  Hi Friend...Thank u for ur valuable response.. IS IT POSSIBLE FOR US? I need to display the total Number od days... 2008 MONTH 8 DAYS: 8 TOTAL NUMBER OF DAYS : _____ IS IT POSSIBLE FOR US
is it possible to use jsp in java script
is it possible to use jsp in java script  is it possible to use jsp inside the javascript while using java script in body tag on that time i am calculate number of records in mysql, so that i am using jsp.if count value
is it possible to use jsp in java script
is it possible to use jsp in java script  is it possible to use jsp inside the javascript while using java script in body tag on that time i am calculate number of records in mysql, so that i am using jsp.if count value
array find all possible dimension
array find all possible dimension  Given array: int[] dimension = { 1, 2, 3 }; That produces the output: 1 2 3 12 13 23 123 I'm new to array...i can't figure out the way on even how to start... any idea?...really appreaciate
Shortest the program as possible but output will not change
Shortest the program as possible but output will not change  #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #define MAX_BUF 50 // Size of the buffer to hold intermediate
Shortest the program as possible but output will not change
Shortest the program as possible but output will not change  #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #define MAX_BUF 50 // Size of the buffer to hold intermediate
is it possible to connect the multiple databases from the hibernate application
is it possible to connect the multiple databases from the hibernate application  is it possible to connect the multiple databases from the hibernate application,if it is possible then tell me with step wise manner
i have no programming knowledge is it possible for study java?
i have no programming knowledge is it possible for study java?  hello sir i have no programming knowledge is it possible to study java and jsp and servlet and struts.if it is then how i schedule for this and how to study
Incrementing a Double by the Smallest Possible Amount
Incrementing a Double by the Smallest Possible Amount In this section, you will earn how to increment the double value by the smallest possible amount... by the smallest possible amount, we have invoked the previousDouble() method of ChoiceFormat
Possible ways to Retrieve Data - Development process
Possible ways to Retrieve Data   Hi Deepak, Can u explain me, how manys we can retrive data from database. am confused with ,1)using beans like set property and get property 2)using JSTL tags and apart frm
how to print all possible combination that sum to zero??
how to print all possible combination that sum to zero??  Ã? Consider the sequence of digits from 1 through N (N<=9) in increasing order: 1 2 3.... Print all possible combinations that sum to zero Example Enter a num : 7 1
Is It Possible To Make $5,000 By Writing Just One Article?
Is It Possible To Make $5,000 By Writing Just One Article?       In today's competitive market, it is not uncommon to hear of huge earning opportunities in even the humblest
javascript:getElementByClassname:Is it possible to collect all the elements with same classname
javascript:getElementByClassname:Is it possible to collect all the elements with same classname  Is it possible to collect all the elements with same classname in a array n display the array by using getElementByClassname
is it possible to add a button inside an autocomplete jquery ui plugin?
is it possible to add a button inside an autocomplete jquery ui plugin?  is it possible to add a button inside an autocomplete jquery ui plugin? My requirement: I have a 4 text input fields that I want to implement autocomplete
Itried all possible ways still getting thesame error
Itried all possible ways still getting thesame error  java.sql.SQLException: Io exception: Got minus one from a read call at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112
java program...need help as soon as possible!!! - Java Beginners
java program...need help as soon as possible!!!  Modify the Lexer (15 points): 1. Use a command line argument for the input file for processing tokens ? do not use simple.x 2. Recognize the new tokens > void float
How sql Queries possible in DAO without creating Database connections - Java Beginners
How sql Queries possible in DAO without creating Database connections  In DAO we are writting sql queries , how it is possible without creating and closing database connections
I want to know the all possible syntax for EL code to print the first element of an array.
I want to know the all possible syntax for EL code to print the first element of an array.  Which is the correct EL codes syntax to print the first element of an array named employeeArray. ${employeeArray["0"]} or ${employeeArray
Fail Early, Fail Often
as soon as possible. You will write a lot of bugs. Just accept it, but make it as easy as possible to find them.. I've known a lot of fanatically capable.... Catch runtime errors early if possible The worst kind of runtime error causes
Extend Text Clock
Java: Example - Extend Text Clock Here are several possible extensions to Example - Text Clock 2. Minor changes. The time should be centered in the field. This can be done by calling the setHorizontalAlignment(JTextField.CENTER
switch Statement - Overview
Java Notes switch Statement - Overview Purpose of switch: select one of many possible statements to execute... on a boolean value (only two possible values). The switch statement allows
Boolean
Java NotesBoolean The primitive type boolean has only two possible values: true and false. Boolean literals - true and false The two values are written with the reserved words true and false. Booleans in control
Java string permutation
Java string permutation In this section, you will learn how to display all possible permutations of a given input string. A permutation refers... have used recursion method with a new string to compute all possible sets
Example - Variations on max()
Java NotesExample - Variations on max() Problem: Write a method to compute the maximum of two double values. Here are some possible solutions. Version 1... flow should be as clear as possible. Version 3 - No need for else when
JavaScript createEventObject method
JavaScript createEventObject method       If user wants to create and add any event to the specified object then its possible to create and add event to the objects
Internet Phone Services
Internet Phone Services          Introduction VoIP or voice over internet Protocol is that technology which makes it possible to make phone calls through the internet
Expression Language Basic Arithmetic
Expression Language Basic Arithmetic          EL means the expression language , it makes it possible to easily access application data stored in JavaBeans
Java binary tree code
Java binary tree code       Binary Tree are the specialized tree that has two possible branches i.e left and right branch. These tree are useful when you build a parse of tree
Running 'assertEquals' method in Junit Test From Ant
framework, this unit tests are possible by extend the junit.framework.TestCases
EL Basic Comparisons
EL Basic Comparisons          EL means the expression language , it makes it possible to easily access application data stored in JavaBeans components. The jsp
MultipleAxes in Chart in Flex4
Multiple Axes in Chart in Flex4: When we use different(Unmatched) data in single chart so it will not be possible to represent multiple series in a single chart. For solving this problem we use multiple axes in a single chart
What Beginners Should Know for PHP
as quickly as possible. This can be used with faster processing in mind. However... as accurately and efficiently as possible. The interpreter will also review scripting tags... written codes must be as accurate and perfect as possible if they are to work
Excel Cell Drop Down List
entered in a cell and provide a drop down list of possible values to the user... in a excel sheet's cell and also can provide drop list of possible value... provided with cell A1 having possible values i.e. 10,20,30.  If the value
Design Pattern
Design Pattern           Structural Patterns are design patterns, which describe the best possible ways to combine the objects and classes forming a larger complex
Java ?throw? Keyword
Java ?throw? Keyword       Exceptions are thrown to signal abnormal conditions that can often be handled by some catcher; though it is possible they may not be caught and therefore
Expression Language in JSP
Expression Language in JSP          EL means the expression language , it is a simple language for accessing data, it makes it possible to easily access
Accessing XML file from Java
example with the source code that will make it possible to access the XML file
Orientation iPhone SDK
please keep in mind that landscape orientation is not possible in the case... is changed from portrait to landscape. But certainly it's possible in navigation
Open Source Installer
Windows installers. It is designed to be as small and flexible as possible... times as possible, with different options every time. The more senarios you can