nishant srivastava
basic program
1 Answer(s)      2 years and 4 months ago
Posted in : Java Beginners

hii actully i am goin for technical interview on java as fresher so please tell me what these two basic lines means :

public static void main(String arg)

and System.out.print();

please give me meaning of each word

View Answers

January 19, 2011 at 12:02 PM


Hi Friend,

In public static void main(String[]args)

public-It indicates that the main() method can be called by any object.

static-It indicates that the main() method is a class method.

void- It indicates that the main() method has no return value.

(String args[])-It is used for receiving any arbitirary number of arguments and save it in the array.

In system.out.print()

System-The System class is a predefined class contains several useful class fields and methods. It manipulates various operating system related objects and provides access to the system.

out-System class has a field out of type PrintStream class that is connected to the console and allow to display something on console.

print()-It is a method in PrintStream class that displays the String which is passed to it.

Thanks









Related Pages:
basic
basic  thank you sir for your nice reply . ......sir my next que, if java program is modified,if the program is compiled & executed without saving it again,its previous execution takes place,why
A basic program
A basic program  Write a program that will print out the first 10 numbers, their squares and their cubes. Write a program that displays the first... a program that displays the first 20 powers of 2. Number and then the power
basic program
basic program  hii actully i am goin for technical interview on java as fresher so please tell me what these two basic lines means : public static void main(String arg) and System.out.print(); please give me meaning of each
java basic
java basic  java program for finding LCM and HCF
java basic
java basic  write java program to evaluate 1+x^2+x^3+x^4+............+x^n
Summary - Basic Elements
Java: Summary - Basic Elements In this section we will see how to comment... generation by the javadoc program. */ Identifier Names Start...) is created with new. When program is loaded. Where
Summary - Basic Elements
Java: Summary - Basic Elements In this section we will learn about commenting... documentation generation by the javadoc program. */ Types... of the class (object) is created with new. When program is loaded
Java basic question...
Java basic question...   Design a Java Application project...), emp_desig as String (To hold designation of the employee) and basic as Integer (To hold the basic salary of the employee). (iii) Define and declare a method
BASIC Java - Java Tutorials
Basic Java Syntax This tutorial guide you about the basic syntax of the java programming language. For writing any program, you need to keep in mind... of the java which is applicable to all java program : Case Sensitive Java Java
Basic problem for Java experts
Basic problem for Java experts  This assignment will test your... An athletics club require a simple statistical analysis program for analysing lap speed for runners. The program should provide the following functionality Allow
size of different basic data types
size of different basic data types   Write a simple program to find the size of different basic data types in java
Summary - Basic GUI Elements
Java: Summary - Basic GUI Elements In this tutorial we will learn about Basic GUI elements in Java program. Following table summarizes the variable... JFrame.EXIT_ON_CLOSE to terminate program when close box clicked. w.setResizable
Core java Basic
Core java Basic  How to compile a program using the package statement at the first line.Do I have to create a a Seperate Folder with the name of the package in my directory.Please tell me the steps
java basic - Development process
java basic  Hi, I write a program for printing string n no of times.i gave string in console.if i gave '&' or '|' or '>' or '<'.so i want to take & as a string without giving " " for the &.directly i gave the string
Java: Basic GUI
program 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Program
Program  Create a Super class Department(dno, dname, dlocation) and a method calsalary(float basic, float DA, float HRA).Define a subclass Employee(eno, ename, dno, dname, dlocation). Calulate the salary of an employee by using
Program
Program  Create a Super class Department(dno, dname, dlocation) and a method calsalary(float basic, float DA, float HRA).Define a subclass Employee(eno, ename, dno, dname, dlocation). Calulate the salary of an employee by using
Basic Filter
Basic Filter       Basic Filter Basic filter is used to implement some properties like filter...; </body> </html> OUTPUT Description of program
code for a simple java program which performs basic arithmetic operation addition,subtraction,multiplication,division........
code for a simple java program which performs basic arithmetic operation addition,subtraction,multiplication,division........  code for a simple java program which performs basic arithmetic operation addition,subtraction
updating an access database with visual basic 2010
updating an access database with visual basic 2010  I am building a program in visual basic 2010 that connects to an access database. I was wondering if you could help me figure out the code for the save button. When
Basic Java Language Elements
Basic Java Language Elements      ... in the program.   Java Comments To comprehend any programming language... the logic of the program.    Java Data Types Java
basic html
basic html  what is the difference between html4 and html5
basic question
basic question  how we create a new table with the same structure and data of another table
basic doubts
basic doubts  can i write two beans within a same xml file..? Also can i write two xml files within a same package
constructor program
constructor program  write a program to calculate the gross salary... address,basic,hra,da,ta,vehicle loan,personel loan use the scanner class....using constructor.pls send program
Basic Principles of Marketing Management
of their prime focus areas. The basic principles of marketing management have been... some of the basic principles of marketing management that are currently... Analysis Market analysis is the first and very basic principle of marketing
Expression Language Basic Arithmetic
Expression Language Basic Arithmetic   ... in attribute values. The basic Expression Language arithmetic are: Addition... the arithmetic expression for EL. The code of the program is given below
basic function of computer system
basic function of computer system  What is the basic function of computer system
EL Basic Comparisons
EL Basic Comparisons      .... The Expression Language has the following Basic Comparisons: < >  ... of the program is given below:   <html> <head> <
netbeans program
please :) You are required to create a basic library management system for use with books. A Graphical User Interface (GUI) is not required, i.e. your program... number of items. Your program should provide a menu of options to work
Basic Validators provided by the framework.
Basic Validators provided by the framework.  What are Validators? and What are Basic Validators provided by the framework
Basic Java Tutorial
Basic Java Tutorial  Hi, Where is the url of Basic Java Tutorials on roseindia.net? Thanks   Hi, You can Learn Java in a Day also? Thanks
Java Program
Java Program  Problem Statement A game is made around the basic concept of a man pushing a box in a maze, from its source to its destination. The maze consists of cells that are empty or have obstacles. The box is heavy
java and visual basic
java and visual basic  Hello, Please how does java and visual basic interact or talk
basic c/c++ questions
basic c/c++ questions  Are the Control statements like if(),while() in built functions? if no, why not as they satisfy all the properties of a function
basic c/c++ questions
basic c/c++ questions  Are the Control statements like if(),while() in built functions? if no, why not as they satisfy all the properties of a function

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.