Home Tutorialhelp Comment why do that

 
 

Comment

bolbol
why do that,
September 22, 2008 at 3:05 PM

Addition of two numbers!
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
at addnumbers.main(addnumbers.java:4)


why do that ,,must print the sum when add two number
View All Comments | View Tutorial
Related Tutorial and Articles
Java Tips and Examples

Learn Java in a day
Learn Java in a day     ... of java concepts through simple programs. We hope, "Learn java... In this section, you will learn to download and install java in your computer.  You 

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 

Hibernate Interview Questions

Why do we use ORM?
Why do we use ORM?  Why do we use ORM?   ORM is technology to access the data from the database. With the help of ORM framework, business... define the mapping of which property for which column. In ORM we can use plain java 

Java Beginners

Output Previous or Next Day of the Month
sequence of: Enter todays date(1-30): 30 Do you want the next or previous day...Output Previous or Next Day of the Month   Please Help! I need to create the following program: Objective of this Program: (1) To learn about having 

Java Beginners

learn
learn  how to input value in java 

Applet Questions

learn
learn  i need info about where i type the java's applet and awt programs,and how to compile and run them.please give me answer 

Java Beginners

Day for the given Date in Java
Day for the given Date in Java  How can i get the day for the user input data ?   Hello Friend, You can use the following code: import..."); String day=f.format(date); System.out.println(day 

General

Get first day of week
Get first day of week       In this section, we will learn how to get the first day of ..._package>java FirstDayOfWeek Day of week: 7 Sunday 

Spring Framework Questions

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

Java Beginners

Where to learn java programming language
fast and easily. New to programming Learn Java In A Day Master Java Tutorials...Where to learn java programming language  I am beginner in Java and want to learn Java and become master of the Java programming language? Where 

Java Beginners

to learn java
to learn java  I am b.com graduate. Can l able to learn java platform without knowing any basics software language.   Learn Java from the following link: Java Tutorials Here you will get several java tutorials 

Java Beginners

Hey Guys really need to learn - Java Beginners
Hey Guys really need to learn  Im a java beginner and i want to know how can i input 3 value.. Wath i mean is in C, to you to be able to input number u will use scanf(%d%d%d, & month, day, year). How can i do this in java 

Java Beginners

Learn java
Learn java  Hi, I am absolute beginner in Java programming Language. Can anyone tell me how I can learn: a) Basics of Java b) Advance Java c) Java frameworks and anything which is important. Thanks 

Java Code Examples

Java date add day
Java date add day In this tutorial, you will learn how to add days to date... to date or subtract days from date) for java applications. Here, we are going to add few days to current date and return the date of that day. For this, we 

PHP Tutorial

Why PHP ?
Why PHP? Reasons to use PHP are given below: 1.    PHP is open... is easy to learn : PHP is extremely simple for newcomer, but offers many... complex data exchange, Java objects, and CORBA 

Java Tips and Examples

do-while Loop in Java
do-while Loop in Java       In some conditions in java, you need to run some statements and processes once at least. For that you have to use the do while loop in  after 

Java Beginners

Java is an opensource program or not? why???
Java is an opensource program or not? why???  Java is an open source program or not.. why 

Java Tips and Examples

Find Day of Month
Find Day of Month       This example explores how to find the day of a month and the day of a week  This example sets the year as 2007 and the day as 181. The example  

General

Java get Next Day
Java get Next Day       In this section, you will study how to get the next day in java...() provide the string of days of week. To get the current day, we have used 

Java Interview Questions

why java is securable ?
why java is securable ?  why java is securable ?   Hi Friend, Java is secured because of following reasons: 1) It doesn't allow... is executed under JAVA Runtime Environment which has several Security related checking 

Java Beginners

Why bufferedreader is used in java?
Why bufferedreader is used in java?  Hi, What is the use of BufferedReader class in Java? why bufferedreader is used in java? It will be great if anyone can give me the example code of BufferedReader class in java. Thanks 

JDBC-Tutorials

JDBC Training, Learn JDBC yourself
programming language of java then fist learn our following two tutorials: Learn Java in a Day and Master... JDBC Connection Pooling Accessing Database using Java and JDBC Learn how 

Java-Tutorials

Where can I learn Java Programming
Learn Java in a Day Master Java in a Week More links for Java... and time to learn Java in a right way. This article is discussing the most asked question which is "Where can I learn Java Programming?". We have 

Programming Tutorials

Java: Why aren't Java GUIs easier?
Java NotesWhy aren't Java GUIs easier? I don't want to exaggerate the difficulties of working with Java GUIs because they are much easier to build... in Visual Basic, for example. Flexibility in the big Java program 

Java Tips and Examples

Find the Day of the Week
Find the Day of the Week       This example finds the specified date of  an year and a day... time zone, locale and current time. The fields used:  DAY_OF_WEEK 

Java Beginners

How we learn java
How we learn java  what is class in java? what is object in java? what is interface in java and use? what is inheritence and its type 

Java Beginners

How we learn java
How we learn java  what is class in java? what is object in java? what is interface in java and use? what is inheritence and its type 

Java Beginners

How we learn java
How we learn java  what is class in java? what is object in java? what is interface in java and use? what is inheritence and its type 

Java Beginners

How we learn java
How we learn java  what is class in java? what is object in java? what is interface in java and use? what is inheritence and its type 

Java Beginners

How we learn java
How we learn java  what is class in java? what is object in java? what is interface in java and use? what is inheritence and its type 

Java Beginners

what should i do next?? - Java Beginners
what should i do next??  I know java basics.actully i passed the SCJP exam.Then now i have no idea about what should i do next.I like to come... can learn servlets after that JSP.My personal interest iam saying that if u 

Java Interview Questions

do this for me plzz - Java Interview Questions
do this for me plzz  Given the no of days and start day of a month... to print in the same line i.e., without printing a newline. 2)You do...: http://www.roseindia.net/java/ Thanks. Amardeep 

Java Beginners

Do needful - Java Beginners
Do needful  Hai how can I do the string to Hex in java. Pls help me  use conversion concept  Hi friend, import java.io.*; import java.io.IOException.*; public class StringToHexa{ public static void 

Programming Tutorials

EJB, Enterprise java bean- Why EJB (Enterprise Java Beans)?
Why EJB (Enterprise Java Beans)?        Enterprise Java Beans or EJB for short is the server-side component architecture for the Java 2 Platform 

Java Tips and Examples

Rationale for GUI tutorial decisions
Table of Contents Rationale for GUI tutorial decisions Java offers many... problems. Here are some of the choices that were made, and why I made them. Why learn GUI programming? All "normal" programs are GUI based, so this question 

Java Beginners

Dont Do this - Java Beginners
Dont Do this  Whenever you guys ask a question please describe your query? Otherwise you lost your time and other who are given answer to you. thanks Rajanikant 

Programming Tutorials

While and do-while
While and do-while       Nested classes Here is another advantage of the Java, object... briefly in the next section.   Why Use Nested Classes 

Java-Tutorials

The while and do
While and do-while      ...\xml>java Bonjour Bonjour Bonjour Bonjour Bonjour... that the condition becomes false and the loop terminates. Have a look at do 

Java Interview Questions

why zero? - Java Interview Questions
why zero?  import java.util.Scanner; public class Simple { public... number is" + lowest); } } why the lowest number is zero?.. i know by default it will be zero.. but why i can get value for largest number 

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 

Java Beginners

why java program not run with msword editor
why java program not run with msword editor  if java program write in MICROSOFT WORD then why they are not run with jdk 

Java Beginners

Why does Java not support operator overloading?
Why does Java not support operator overloading?  Hi, Why does Java not support operator overloading? thanks 

Java Beginners

how to do this?
how to do this?   Given any integer 2D array, design then implement a Java program that will add to each element in the array the corresponding column number and the corresponding row number. Then, it prints the array before 

General

Getting Previous, Current and Next Day Date
Getting Previous, Current and Next Day Date       In this section, you will learn how to get previous, current and next date in java. The java util package provides 

Java Tips and Examples

Learn Java - Learn Java Quickly
Learn Java - Learn Java Quickly       Java is an object oriented programming language... and universities. The most important feature of Java is that it can run 

Java Beginners

Toedter JDateChooser JSpinner change day value by default in java
Toedter JDateChooser JSpinner change day value by default in java  i have a question, by default the JSpinner when you press up or down buttons it changes the month value. There is a way to change the day value, instead 

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 

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 

Training

Marvellous chance to learn java from the Java Experts
Marvellous chance to learn java from the Java Experts A foundation course on Java technology which... for Software Development on Java Platform. Learn to implement 

Struts Questions

why servlet as controller - Struts
why servlet as controller   Hi Friends, Main reasons for using servlet as a controller in struts. why not jsp . Thanks Prakash  Hi Friend, JSP is again a servlet which is having HTML syntax with java support.All 

Java Beginners

Why application server is important?
Why application server is important?  Hi, I have to select the good application server for running my Java based web applications. Which application server or tomcat container is good to run the application. On my website 

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 

Hibernate Tutorial Example

Why hibernate is used?
Why hibernate is used? Hibernate is leading ORM solutions for developing the persistence layer of the enterprise applications. It provides gives performance... Hibernate saves the development time Hibernate allows to map the Java 

XML Tutorials

Why XML?, Why XML is used for?
Why XML? In this section we will understand the importance of XML and see Why... the structured data into XML files. There are various uses of the XML files. Why XML... Why XML is so important in programming? These days programming of almost all 

Java Interview Questions

Which java collection to use in scenario below and Why?
Which java collection to use in scenario below and Why?  I want to store thousands of record in a collection and later I want to search. For best and optimized results, which collection will I prefer 

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 

Java Beginners

what fastest DataStructre(efficient) in java? and why? - Java Beginners
what fastest DataStructre(efficient) in java? and why?  what is the fastest data Structres in java? and how,why compare to other DataStructer from other 

Programming Tutorials

Implementation of Day Class
Implementation of Day Class Here we are going to design and implement the class Day. The class Day should store the days of the week. Then test the following operations through the object of the class Day: 1) Set the day. 2) Print 

JSP Servlet Questions

How do i do the coding for 'leaving a comment' in java
How do i do the coding for 'leaving a comment' in java  i am designing a webpage.In my webpage i want to add the option of adding a comment by the readers of the page.how do i do 

Java Beginners

How do I do this program? I'm new to Java programming...
How do I do this program? I'm new to Java programming...  Suppose you want to print out numbers in brackets, formatted as follows: [1] [2] [3] and so on. Write a method that takes two parameters: howMany and lineLength 

Java Beginners

Why is the main method declared static?
Why is the main method declared static?  Hi, Why is the main method... Java class always has the same signature, and we declare public static void main... without creating any instance for the java class, where we declared it. Any static 

Java Beginners

how to do combinations in java - Java Beginners
how to do combinations in java  i have 2 arrayLists. i want do...()); } } } For more information on Java.util Package visit to : http://www.roseindia.net/java/example/java/util/ Thanks 

Enterprise Java

Introduction To Java Servlet Technology
Introduction To Java Servlet Technology In this tutorial you will learn about the Java servlet technology and why it came into existence, what are its features etc. Java Servlet is a technology to generate the dynamic content on web 

Java Interview Questions

why the occupancy rate is zero? - Java Interview Questions
why the occupancy rate is zero?  import java.util.Scanner; public class lab3 { public static void main(String[]args) { int floor; int...); } } why the occupancy rate is always zero? please help. tq.  Hello 

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 java.awt.event.KeyEvent; import java.awt.event.KeyListener; import 

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 java.awt.event.KeyEvent; import java.awt.event.KeyListener; import 

Java Server Faces Questions

java do wile - Java Server Faces Questions
java do wile  Write a program that asks the user to enter two words. The program then prints out both words on one line. The words will be separated by dots so that the total line length is 40. If your first word was turtle 

Java Beginners

Why the null Pointer exception is comming? - Java Beginners
Why the null Pointer exception is comming?  My code is given below: import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import 

Java Interview Questions

Why does Java provide both abstract class as well as interface
Why does Java provide both abstract class as well as interface  why does java have both abstract class as well as interface? what is the need or importance of having both 

Java Beginners

for writting java program why we are taking more than one class
for writting java program why we are taking more than one class  for writting java program only one class is enough but why we are taking more than one class 

Hibernate Questions

why to use hibernet vs jdbc
why to use hibernet vs jdbc  plz send me the reply   Hi Friend, Differences: 1) Hibernate is data base independent Where JDBC is database... to implement your java cache. 4) Development is faster in Hibernate than JDBC. 5 

Java Beginners

Java
to be some nuances. Can yo please run it for me and and let me know why is it not running? Instruction: Write a java applet that does the following functions...) // if the value of play equals 1, then do this { g.setColor(Color.blue); // set 

Java Beginners

how do you parse by reference in java(with JGrasp)
how do you parse by reference in java(with JGrasp)  i am a 1st year beginner in java programming(GR 10) at hillcrest High School in south Africa My question is how do you parse by reference in java(with JGrasp) please help me i 

Training

Learn Online Java Training
Learn Online Java Training It would be safe to say that the advancements... their online class. Learn online Java programming training ensures that students... of the advancements in Java online Training. It has thus become exceedingly 

Java Beginners

why java does not support multiple inheritance - Java Beginners
why java does not support multiple inheritance  hello friend, i knows that multiple inheritance is not supported in JAVA but this program looks ok then why we can not extends multiple classes in a single class, eventhough 

Java Beginners

HOW TO DO WEBSITE INTERFACE FOR JAVA MODULE
HOW TO DO WEBSITE INTERFACE FOR JAVA MODULE  Hi , Greetings. I have created modules in java separately , example student registration , view... , student regis. modules is displayed and so on. What need to do to create 

Java Beginners

Java
why is it was not running and then send me this source code after it is working... a java applet that does the following functions based on a hard coded variable named... if count is less than 2 if (play == 1) // if the value of play equals 1, then do 

PHP Tutorial

It?s Easy to See Why You Should Learn PHP
and easy for anyone to learn how PHP can work. Here are some reasons why a person should learn how to use PHP. There is a very good reason why it is important to learn how to use PHP. This is because PHP is becoming one of the most commonly 

Java Beginners

why set doesn't allow duplicate value
why set doesn't allow duplicate value  HI Everyone Any one can help me why set not allowed duplicate value in java. Please post ur comment, its urgent. Thanks in advance 

Java Beginners

how do i write a java program for this??
how do i write a java program for this??  â??Ask the user if they have a dog. If â??yesâ??, ask the user how old is and compute the dogâ??s age in human years. Display the output. If â??noâ?? ask the user their age and compute 

JSP Servlet Questions

Why request.getParameter(
Why request.getParameter(  Hi all, I want to to do upload file in my folder and that time i want to store date in my MySQL Database. Here...="POST"> why it happen? Anybody plz help me.. i want use it my project...plz 

Java Beginners

how to do an measure converter in netbeans - Java Beginners
how to do an measure converter in netbeans   hi im not sure... information on joptionpane visit to : http://www.roseindia.net/java/java-tips/GUI/containers/20dialogs/10joptionpane.shtml http://www.roseindia.net/java/java-tips 

Java Tips and Examples

While and do-while
While and do-while      ... C:\vinod\xml>java Bonjour Bonjour Bonjour... at do-while statement now. Here is the syntax: do { statement(s 

General

Java: Java Tutorials
to learn Java and object oriented concepts. IT Professionals... to Operating Systems) at the University of Wisconsin - Madison learn enough Java to do the course projects. This course will assume that all students are Java 

WebSevices Questions

Please help me to learn - WebSevices
Please help me to learn  Please help me to learn Java Fast 

Struts Examples

Struts 2, JPA and Hibernate Training
; Learn Struts 2, JPA and Hibernate in a combined 5 day online course that makes you expert in these technologies  LEARN STRUTS 2 AND RELATED TECHNOLOGIES FROM INDUSTRY EXPERTS Do you wish to learn latest Java technologies 

Java Beginners

Why do the slashes change when the console gives me the error?
Why do the slashes change when the console gives me the error?   The string input as the filename looks like this: String file = "http...(Image.java:120) at java.lang.Thread.run(Thread.java:619) Why do the slashes change 

General

do while loop
do while loop       In java a do while loop is a control flow statement that allows a certain code to be executed repeatedly based on a given condition. This loop is used in java 

JavaMail Questions

why mails are sending from the linux server - JavaMail
why mails are sending from the linux server  Mails are not sending... and Our java application is inside linux server. Whenever we send the mails from java application,mail are not sending .Mail server is installed on windows 2003 

Hibernate Questions

How do you map Java Objects with Database tables?
How do you map Java Objects with Database tables?  Hi, How do you map Java Objects with Database tables? thanks 

General

Java File - Learn how to handle files in Java with Examples and Tutorials
Java File - Example and Tutorials This section is discussing about file handling in Java. You will learn how to handle file in Java. Examples given here teaches you about file handling in Java with many code snippets and ready to use 

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 string in the main method not any other one.. specify the reason... and tell me each and every meaning of public static void main(String args[])...    

Java Tips and Examples

Java Notes: Generics
Java Notes: Generics Using predefined generic classes is commmon, writing... generally won't define generic classes and methods yourself, but you do have to understand how and why they are used. Basic problem -- restricted 

Java Beginners

why to create directory structure as web-inf & classes & lib - Java Beginners
why to create directory structure as web-inf & classes & lib    we all know that to prepare webapplications we will create a direcotry sturcture like webroot direcotry (eg:- f:\ourwapp) a)creating a direcotry 

Java Beginners

why to create directory structure as web-inf & classes & lib - Java Beginners
why to create directory structure as web-inf & classes & lib    we all know that to prepare webapplications we will create a direcotry sturcture like webroot direcotry (eg:- f:\ourwapp) a)creating a direcotry 

Java Beginners

How do i create the node for target SMO in java..???
How do i create the node for target SMO in java..???  How do i create the node for target SMO in java..??? or else whats the method for accessing the target SMO 

Java-Tutorials

Determining the Day-of-Week for a Particular Date
Determining the Day-of-Week for a Particular Date       This section simply show the current day in word i.e. the Day of Week for a particular date. Here, you can learn about the way 

General

The do Keyword
The do Keyword          Keywords are special symbols in the Java programming language, which are reserved for a Java program. The do is a Java keyword, that may 

Java Beginners

How to do Null validation for a boolean variable - Java Beginners
How to do Null validation for a boolean variable  How to do Null validation for a boolean variable in JAVA?  Hi friend, For solving the problem visit to : http://www.roseindia.net/java/master-java/variables 

Flex Questions

Why "<![CDATA[ ]]>" CDATA tag.
Why tag.  . Why do we use this tag and what is the name of this tag 

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.