Home Tutorialhelp Comment its good q ans my q is why we write static

 
 

Comment

gulshan
its good q ans my q is why we write static,
January 2, 2007 at 3:51 PM

its good q ans



my q is why we write static in main.

public static void main(string agrs[])
View All Comments | View Tutorial
Advertisement
Related Tutorial and Articles
Java Interview Questions

q
q  how to add 2 numbers in java   Hi, Try this: class Test{ public int add(int a,int b){ return a+b; } public static void main(String []args){ Calculation cal=new Calculation(); int 

Programming Tutorials

Corejava Interview,Corejava questions,Corejava Interview Questions,Corejava
;    Q 1 : How should I create an immutable class ? Ans...; Q 2 : Is println overloading or overriding ?  Ans : The println() method...;     Q 3 : What is dynamic method dispatch ?  Ans 

Programming Tutorials

Corejava Interview,Corejava questions,Corejava Interview Questions,Corejava
as a string parameter.   Q 7. Why is the String class declared final ? Ans...;   Q 2. What is hashcode? When is hashCode() used ? Ans : ... a class reference without using new operator ? Ans : We mostly use the new keyword 

Programming Tutorials

Corejava Interview,Corejava questions,Corejava Interview Questions,Corejava
.   Q 3. Is it possible to convert a string to an abstract path ? Ans... of a relational database, but it can take other forms also.   Q 5. Why... iterator.   Q 7. How can I insert a new row between two others ? Ans 

Java Beginners

Please help with this Q
Please help with this Q  Write a program that should allow a tutor to enter in various marks which students have been awarded, until the tutor enters... { public static void main(String args[]) { float marks[]=new float[20 

Java Beginners

Please help with this Q ASAP
Please help with this Q ASAP  The University wants to make a basic graphical display to show how many people received different grades for a piece of work on a module. You are required to write a program in Java that achieves 

JSP Servlet Questions

q - JSP-Servlet
and at runtime it save in .js file from that we show data in html control like dropdown control but the problem is as much time we run our project a same number...; Hi Friend, Please send your code so that we can help you. Thanks 

SQL Question

sql q's
sql q's  Find out the job that was filled in the first half of 1983 and same job that was filled during the same period on 1984? Display... before 15th of the month? For the above Q's please respond quickly all the queries 

Java Beginners

q in java
q in java  Designed a program that allows the user to enter a name Then the program prints the characters of a-z and after each letter means... f 0 g 0 h 1 i 0 j 1 k 0 l 0 m 0 n 1 o 1 p 0 q 0 r 0 . . . . z 0   up 

Java Beginners

static
Static Concept  in what are all the situation we may use static...,then use static blocks and without creation of object we need to perform some task,then go for static methods. If we want variables those values will not be changed 

HTML

HTML - Q (quotation) tag.
HTML - Q (quotation) tag. Description : It generates a quotation over the text. Code : <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional 

Hosting Tutorial

Free Web Hosting - Why Its not good Idea
Free Web Hosting - Why Its not good Idea This article shows you why Free Web Hosting is not good Idea for hosting your web sites, specially when you... is also a headache and you will waste good time. Looking above above facts, we 

Java Beginners

corejava - Java Beginners
corejava pass by value semantics  Example of pass by value semantics... arguments to the method call is passed to the method as its parameters. Note very.... This is, for example, why you cannot mutate the (original, caller's) reference to the object 

Java Beginners

corejava
corejava  Creating the object using "new" and usins xml configurations whih one is more useful?why 

Java Interview Questions

corejava
corejava  if we declare abstract as final what happen 

JDBC Questions

Not get ans properly
Not get ans properly  I create db on my system using MS-acess,then I create DSN for program but I still not get answer It throws an Exception... java.sql.*; public class CreateTable { public static void main(String[] args 

Programming Tutorials

Corejava Interview,Corejava questions,Corejava Interview Questions,Corejava
interface is an abstract data type like a class having all its methods abstract i.e. without any implementation. That means we cannot create objects 

Java Beginners

Why is the main method declared static?
Why is the main method declared static?  Hi, Why is the main method declared static? thanks   Hi, When we declare main() method in any Java class always has the same signature, and we declare public static void main 

Java Beginners

Why we are writting public static void main(String args[])?
Why we are writting public static void main(String args[])?  Why we are writting public static void main(String args[])? please elaborate it... and also explain the statement System.out.println("abc 

Java Beginners

Why PriorityQueue gives such a strange behaviour?
. Its not even sorting based on count parameter. Why this is so? I then tried the same code on my windows 7 system, its again started producing correct results...Why PriorityQueue gives such a strange behaviour?  I am using 

Java Beginners

ans plz
) { } } } class MultithreadedProgram { public static void main(String[] args 

Java Beginners

corejava - Java Beginners
corejava  code for converting the numer into character(for ex;if we... java.io.*; class NumToWords { private static final String[] maxWords...", " quadrillion", " quintillion" }; private static final String 

Java Beginners

corejava - Java Beginners
. As software developers design and build different applications, we come... for the same/similar problem everytime, and we end up "reinventing the wheel" again...{ public static void main(String[] args){ Thread th = new Thread 

JSP Servlet Questions

can we write a method in JSP - JSP-Servlet
can we write a method in JSP  Hi All, In my web application I want to call another second jsp file. I can do it by redirecting my first jsp file... write you requirement clear then i can able to give ans. thanks rajkumar 

Java Beginners

CoreJava Project
CoreJava Project  Hi Sir, I need a simple project(using core Java, Swings, JDBC) on core Java... If you have please send to my account 

Java Beginners

What happen when we write static public void instead of public static void?
What happen when we write static public void instead of public static void?  Hi, What happen when we write static public void instead of public static void? Thanks   Hi, The program will compile first then run 

Java Interview Questions

static methods
static methods  why static methods cannot read or write the instance variables 

Hibernate Interview Questions

Why do we use ORM?
Why do we use ORM?  Why do we use ORM?   ORM is technology... programming. In ORM we define the way of mapping of classes to table and also define the mapping of which property for which column. In ORM we can use plain java 

Java Beginners

Q, 12 WAP to calculate addition of two distances in feets and inches using objects as functions arguments in java
Q, 12 WAP to calculate addition of two distances in feets and inches using objects as functions arguments in java  Q, 12 WAP to calculate addition of two distances in feets and inches using objects as functions arguments in java 

Java Interview Questions

why using static keyword
why using static keyword  why using static keyword 

Development process Questions

pls help its eating my time:(
pls help its eating my time:(  hi am new to struts2.0 in my application i have declared a list in static how to get the static list values in my result.jsp??? if i remove the static in the list the result is getting displayed.why 

Java Beginners

static
redeclare static variable in the inherited class  can we redeclare static variable in the inherited class like this: public class StaticClass1 { class StaticClass1{ static int noOfInstances; StaticClass1 

General

Static Nested Classes
: OuterClass.StaticNestedClass If we want to make an object of the static nested class then we have to write down the following code... Static Nested Classes       

General

Q - Java Terms
Q - Java Terms       Java Quartz Framework Quartz is an open source job scheduler.  It provides powerful mechanisms for job scheduling. It can 

Software Services

What is Static Website
. A static website is just you write your material in any word processor...What is Static Website The static website is simple website design which... to expand their business through web. Through static website individuals or small 

Java Beginners

why my keyevent not function ? - java swing -
why my keyevent not function ? - java swing -   import java.awt.*; import java.awt.event.*; import javax.swing.*; import... jbtDivide; // main method to instantiate and customize frame public static 

Java Beginners

why my keyevent not function ? - java swing -
why my keyevent not function ? - java swing -   import java.awt.*; import java.awt.event.*; import javax.swing.*; import... jbtDivide; // main method to instantiate and customize frame public static 

XML Tutorials

Why XML?, Why XML is used for?
Why XML? In this section we will understand the importance of XML and see Why XML is so important these days. We will also see the different usages of XML... the structured data into XML files. There are various uses of the XML files. Why XML 

Java Beginners

arrays,why we cannot use this statement
arrays,why we cannot use this statement  import java.util.*; class Dash{ public static void main(String args[]){ int x0=100; int[] x1=new int[3]; int[][] x2=new int[3][3]; int[][][] x3 

Java Beginners

arrays,why we cannot use this statement
arrays,why we cannot use this statement  import java.util.*; class Dash{ public static void main(String args[]){ int x0=100; int[] x1=new int[3]; int[][] x2=new int[3][3]; int[][][] x3 

Java Beginners

how can i simplify my java code
how can i simplify my java code  /* Create a program that prompts... { public static void main (String [] args) { Scanner kb = new... sorry \n \n"); System.out.println("Enter password its your second last 

General

Jakarta Struts Interview Questions
ActionForward object.   Q: Write code of any Action Class? A: Here...;    Q: What is Jakarta Struts Framework... applications with Java. Q: What is ActionServlet? A: The class 

Java Beginners

Some additions for my previous question - Java Beginners
Some additions for my previous question  This is the question I posted several hours ago: "I'm trying to write a program that has a text field... into the overall code. Also I can't quite figure out how to write the code 

Java Beginners

Why is my program running an infinite loop? Parallel Arrays Program
Why is my program running an infinite loop? Parallel Arrays Program  ... an infinite loop. Why? import java.util.*; import java.text.DecimalFormat; public class parallel { public static void main (String[]args 

Java Beginners

Why are my variables not dividing properly?
Why are my variables not dividing properly?  Why are my variables not dividing properly 

Java Beginners

which data structure is good in java..? - Java Beginners
anyone give me good example how that best technique i can use in my programs and reasons why it is good....  Hi Friend, To learn Data Structures...which data structure is good in java..?  Hi frends, Actually i 

Java Beginners

Need help with my project
Need help with my project  Uses a while loop to perform the following.... -Write a label as before. -Output all numbers from secondNum to firstNum in a single line with commas separating the numbers. Write the date and time as the last 

Framework Questions

implement internationlism in Flemish ans Spanish using Sturts1.1
implement internationlism in Flemish ans Spanish using Sturts1.1  HI - we are using struts1.1, we have a requirement to implement internationlism in Flemish ans Spanish. Will this be supported in Struts1.1? How to resolve 

Java Beginners

Why doesn't Java allow overriding of static methods?
Why doesn't Java allow overriding of static methods?  Why doesn't Java allow overriding of static methods 

Java Beginners

Why application server is important?
Why application server is important?  Hi, I have to select the good... server or tomcat container is good to run the application. On my website... and Tomcat for testing the application. My application should give good performance 

Java Interview Questions

Write a java application program........?
Write a java application program........?  Welcome every One : I have Q in Java? Q : Write a java application program that reads 20 integer numbers input by the user and prints how many numbers > 100 and how many numbers 

Java Beginners

mahesh want to know java with good understanding
mahesh want to know java with good understanding  I need to know about java beans(what are java beans,why we use java beans, etc...).I want an example program and it's output also.please teach me...   Java Beans 

Java Beginners

corejava - Java Beginners
corejava  how to write a program to multiply 1000 digit numbers with out using biginteger class 

Java Beginners

HOW TO BECOME A GOOD PROGRAMMER
HOW TO BECOME A GOOD PROGRAMMER  I want to know how to become good programmer   Hi Friend, Please go through the following link: CoreJava Tutorials Here you will get lot of examples with illustration where you can 

Java Beginners

JAVA Write code which converts propositional expressions into clauses using the INOA rules
JAVA Write code which converts propositional expressions into clauses using the INOA rules  Write code which converts propositional expressions into clauses using the INOA rules we studied in class. A propositional expression 

Java Interview Questions

corejava - Java Interview Questions
- - - - - - - -public class Singleton{ private static volatile Singleton instance; private Singleton() {} public static Singleton getInstance(){ if(instance == null... Singleton(); } return instance; } public static void main(String args[]){ Singleton 

Java Interview Questions

corejava - Java Interview Questions
corejava  how can we make a narmal java class in to singleton class 

Java Beginners

Why we should use string args[] in main method in java?
Why we should use string args[] in main method in java?  we use only... each and every meaning of public static void main(String args[])...   import javax.swing.JOptionPane; public class a3c4e23 { public static void main 

Java Beginners

corejava - Java Beginners
is dynamic binding and second is static binding.Please check http 

Java Interview Questions

Corejava - Java Interview Questions
static void main(String[] args) { Scanner input =new Scanner(System.in...: import java.util.*; public class String_Example{ public static void main 

Java Interview Questions

corejava - Java Interview Questions
corejava  how to merge the arrays of sorting i want source code of this one plz---------------------------------------------  Hi Friend, Try the following code: public class MergeSort{ public static void main 

Java Beginners

corejava - Java Beginners
static void main(String args [ ]){Box b1=new Box(3,4,5);b1.displayvolume 

Junit

JUnit and its benefits
JUnit and its benefits      ... written by Erich Gamma and Kent Beck. There are many ways to write test cases...) works as expected. So if we want an accurate and efficient testing process 

Java Beginners

corejava - Java Beginners
corejava  how to retriving data from html to servlet?how send the data servlet to text.file   hai friend, By using FormBeans we can get the data from from html by servlet,because it follows Frontcontroler design 

Java Beginners

CoreJava
 

Java Beginners

why java file save as its class name
why java file save as its class name  hi,this is subbareddy vajrala.my doubt is why java files save as its class names 

Java Beginners

details of my program - Java Beginners
details of my program  hi 1- allow the customer to order any thing from the registered list and give him the cost of his orders 2- we do the same...) days maybe we can give up from using array of oblect and make it as a usual 

General Information

Fashion Trends: Why do we follow them?
Fashion Trends: Why do we follow them? We all hear about the new fashion trends and we always wonder, why do some people follow these trends so strictly... to wear strange outfits that were neither good looking nor comfortable. So, why 

Java Beginners

core java, static - Java Beginners
not be accessed in a static field. But if we create an object of class type in static... ( Ultimately this is what we do in static main method). So is right to say that practically its not impossible to call non-static fields in static fields 

Java Beginners

write the result into excelsheet
write the result into excelsheet  package reader; import... org.openqa.selenium.ie.InternetExplorerDriver; public class ReadExcel { static String homeurl="http://192.168.5.19:79/Home.aspx"; public static void main( String [] args ) throws 

Design concepts & design patterns Questions

without writing web.xml file we can write servlet program
without writing web.xml file we can write servlet program  Sir Morning... Sir I have one Question "without writing web.xml file we can write servlet program". if yes which way? if no why? but without use Annotation........ Plz 

Java Beginners

please any one can help me to write a code for this question?
please any one can help me to write a code for this question?  Q 1) In a class first day 25 students are joined. After two days that total students will increased to 60. We can develop a program by using ArrayList concept 

Java Beginners

Hi good afternoon
Hi good afternoon  write a java program that Implement an array ADT with following operations: - a. Insert b. Delete c. Number of elements d. Display all elements e. Is Empty 

Java Beginners

I'm getting an illgal start of expression error in my code for the public static boolean portion at the bottom... any ideas?
I'm getting an illgal start of expression error in my code for the public static boolean portion at the bottom... any ideas?  heres my code import... { public static void main (String[] args) { Random rand = new Random 

Java Interview Questions

Can we replace main() with static block or with other static methods?
Can we replace main() with static block or with other static methods?  what is the use of public static void main()?can't we achieve the same thing through static block or through other static methods 

Java Beginners

STACK - WHY THE OUTPUT COMES LIKE THIS?
has dog My WHY THE OUTPUT COMES LIKE...STACK - WHY THE OUTPUT COMES LIKE THIS?  //: holding/StackTest.java import net.mindview.util.*; public class StackTest { public static void main 

Java Beginners

Write an event driven program to perform the arithmetic operations as shown in the interface
the java programming code for that question. my question is here: Q. Write...Write an event driven program to perform the arithmetic operations as shown...*; class SimpleCalculate { public static void main(String[] args 

Cloud Computing

Why Big Data is important for Enterprises?
Why Enterprises are looking for Big Data? What are the importance of Big Data in enterprises? In this article we will understand the importance of Big Data... daily. So, its very important for the enterprises for gathering and analyzing 

Software Services

Why Offshore Outsourcing,Why Offshore Outsourcing Useful,Why Need of Offshore Outsourcing Services
Why Offshore Outsourcing? Introduction Offshore outsourcing has established itself as a business trend for many years now. Offshore outsourcing has gained.... The client company benefits by having a good idea of the capabilities of the vendor 

Java Beginners

RetController.java (do get) (my file for reference for a test.. IS LOGIC good Enough ?
RetController.java (do get) (my file for reference for a test.. IS LOGIC good Enough ?   try { Connection conn=Create_Connection.conOpen(); System.out.println(conn); String submit 

Java Beginners

can we inherit static method in java?
can we inherit static method in java?  can we inherit static method in java 

Java Beginners

why we use constructors instead of methods in java?
why we use constructors instead of methods in java?   why we use constructors instead of methods in java 

PHP Questions

why my downloaded file is alwayes damaged or corrupted?
why my downloaded file is alwayes damaged or corrupted?  This is my code <html> <form action='../biopydb/new.php' method='post'> <?php $Pathway_Name = $_COOKIE['pathwayname']; $dir1 ="../biopydb/Pathway 

Core Java

Static
final. However, a static method can't be overridden by a nonstatic method. Or we... Static       Static... an instance of a class. Static methods are implicitly final method, since overriding 

Java Beginners

Can we declare a static variable inside a method?
Can we declare a static variable inside a method?   Hi, Can we declare a static variable inside a method? thanks 

Java Beginners

write a program to demonstrate wrapper class and its methods......
write a program to demonstrate wrapper class and its methods......  write a program to demonstrate wrapper class and its methods 

Spring Framework Questions

Why spring?
Why spring?  Why do we need to learn Spring? and where can we use it thanks 

Java Beginners

Please clarify my doubt
Please clarify my doubt  /here is my sample code for deadlock/ class...(a); System.out.println("Back in other thread"); } public static void main(String[] args) { new Deadlock(); } } My question is that class A has 2 

Web Development

Top 10 Tips for Good Website Design
In providing here some of the most relevant and good website design tips we must... We cannot conclude our list of top 10 tips for good website design without...Designing a good website as to come up with all round appreciation, traffic 

Software Services

Static Website Designing
the static website after consultation of our clients. We chat on several topics... systems, and browsers. While designing the static site, we analytically...Static Website Designing A static website is a site of static web pages 

Hibernate Questions

Why we use singleton class in hibernate sessionfactory?
Why we use singleton class in hibernate sessionfactory?  Hello, Please tell me why we use singleton class in hibernate sessionfactory? hibernate sessionfactory singleton example would be very helpful. Thanks 

Java Beginners

why we use abstract class in java?
why we use abstract class in java?  what is the the purpose of abstract class.Give example when to use abstract and when use interface 

Java Beginners

why we use design patterns in java?Example?
why we use design patterns in java?Example?  Hi..... Why we use design patterns?,why they are needed in programming languages?,advantages?   hi friend, please go through the following links may this will be helpful 

Programming Tutorials

EJB, Enterprise java bean- Why EJB (Enterprise Java Beans)?
. It is a component model that defines how we write user interface components so... can be used with the components we write in someone else's system. RMI does... this in an RMI environment, we would have to write our own search methods 

JavaScript Questions

having problem with menu ans sub menu items css ...plz help!!
having problem with menu ans sub menu items css ...plz help!!  PLZ help ...this is my html menu > <div id="content"> <div >...; > </div and this is my css for my menu: } .item ul{ list 

SQL Question

Why we use Semicolon after SQL Statements?
Why we use Semicolon after SQL Statements?  Why we use Semicolon after SQL Statements?   Hi, Some database systems require a semicolon at the end of each SQL statement.The semicolon character is a statement 

Struts Questions

why we use struts framework instead of springs
why we use struts framework instead of springs  why we use struts framework instead of springs    It depends upon your application requirements.In some cases spring is better and in some cases struts is better 

Java Beginners

Help With My Java Project?
Help With My Java Project?  Write a console program that repeatedly... java.util.Scanner; import java.util.*; public class A4A { public static void main...]+" "); } } } } static class bubbleSort{ { int i; int array 

Hibernate Interview Questions

what is java and why do i need it?
what is java and why do i need it?  Hi, Please tell me what is Java and why do i need it? Is it free to download? Also explain me how to write and test my first Java Application? What is the configuration or system requirement 

WebSevices Questions

Good web services site - WebSevices
Good web services site  Hi can i get reference to the web services site, where i can get the complete web services for scratch.  Hi Naresh, I guess u r in right place. I learn my self from roseindia. thanks 

Advertisements Advertisements
 

 

 

DMCA.com