Comment

rincu
June 11, 2010 at 7:06 PM

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
Why m getting dis error?
View All Comments | View Tutorial
Related Tutorial and Articles
Java Beginners

addition  write a program to add two numbers without using variables   Java add two numbers import java.math.*; class AddNumbers { public static void main(String[] args) { BigInteger num1=new

Java Tips and Examples

Learn Java in a day
; Add Two Numbers in Java In this section, you will learn to access and work... Learn Java in a day   ... diverse functionalities ranging from the addition of two numbers

General

Java Beginners

General

Addition of two Number in Class
Addition of two Numbers in Class   ... the sum of any two number. Java is a object oriented  programming language...; we are going to use addition of  two number. First of all, we have

Java Tips and Examples

Add two big numbers       In this section, you will learn how to add two big numbers. For adding two numbers implement two big decimal numbers then apply the Sum() method

Junit

Writing and testing method of addition of two numbers
Writing and testing method of addition of two numbers  ... a method named sum() which takes two int parameters and return addition of these two... to test the functionality of adding two numbers. So we have created our class named

General

Swapping of two numbers without using third variable
Swapping of two numbers without using third variable In this tutorial we will learn about swapping of two number in java without using third variable. This is simple program to swap two value using arithmetic operation Swapping of two

General

How to Add Complex Numbers Java In this Java tutorial section, you will learn how to add complex Numbers in Java Programming Language. As you are already aware of Complex numbers. It is composed of two part - a real part and an imaginary

General

Add two number in java In this section you will learn about how to add two number in java. In java adding two number,  first taking the input provided... by println() method. Now here is the code for addition of two number in java. import

Java Beginners

Applet for add two numbers  what is the java applet code for add two numbers?   import java.awt.Graphics; import javax.swing.*; public...); add(text2); label3 = new Label("Sum of Two Numbers

Java Tips and Examples

Write a program to list all even numbers between two numbers
Write a program to list all even numbers between two numbers       Java Even Numbers - Even Numbers Example in Java: Here you will learn to write a program for listing out

Java Beginners

adding two numbers - Java Beginners
adding two numbers  hii friends....... this is my program...]=Integer.parseInt(in.readLine()); int s=x[1]+y[1]; System.out.println("Sum of two...]; System.out.println("Sum of two no. is:"+s); } } For read more

Java Beginners

binary addition,subtraction and modulus operations - Java Beginners
binary addition,subtraction and modulus operation between two numbers of 512 bit... by simple logics of control statements.i need to convert two 512 bit numbers... operations on these two binary numbers and finally dipaly the result in decimal

General

Find L.C.M. of two numbers in Java
Find L.C.M. of two numbers in Java Program In this section, you will learn how to find LCM(Least Common Element) of two integers.The least common multiple is the smallest positive integer that is a multiple of both the numbers. Here we

Java Beginners

Add two big numbers - Java Beginners
Add two big numbers - Java Beginners  Hi, I am beginner in Java and leaned basic concepts of Java. Now I am trying to find example code for adding big numbers in Java. I need basic Java Beginners example. It should easy

Programming Tutorials

JavaScript determine add, product of two numbers
JavaScript determine add, product of two numbers In this section, you will learn how to determine addition, multiplication, division and modulus of two numbers. To find this, we have created two textboxes and four button

Java Tips and Examples

Matrix addition in java In this section we will learn about addition of two matrices. In java this is a simple program to adding two matrices, we have...-dimensional array. Here we are going to develop a Java code for matrices addition

Java Code Examples

Java Matrix Addition Example In this tutorial, you will learn how to find the sum of two matrices. You may have solved many Matrix Operations in Mathematics... the sum of two matrices of any order using the java language. In the given program

Java Beginners

To find first two maximum numbers in an array
To find first two maximum numbers in an array  Java program to find first two maximum numbers in an array,using single loop without sorting array

Core Java

Swapping of two numbers in java
Swapping of two numbers in java In this example we are going to describe swapping of two numbers in java  without using the third number in java. We... values from the command prompt. The swapping of two numbers is based on simple

Java-Tutorials

Learn Java in 21 days
java.lang.object. Add Two Numbers in Java Here we have given an example...Anyone can learn Java in 21 days, all they need is dedication and concentration. Java Guide at RoseIndia can help you learn Java in 21 days. The course

Java Tips and Examples

Comparing Two Numbers
Comparing Two Numbers      ... of comparing two numbers and finding out the greater one. First of all, name a class "Comparing" and take two numbers in this class. Here we have taken a=24

General

Swapping of two numbers
Swapping of two numbers      ... program to calculate swap of two numbers. Swapping is used where  you want... ability. In this program we will see how we can swap two numbers. We can do

General

Swap two any numbers
Swap Any Two Numbers       This is a simple Java Oriented  language program. If  you... for understanding Java programming in the simplest way.  Here we will learn how

Java Beginners

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

Java Beginners

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

Java Beginners

WAP to calculate addition of two distances in feets and inches using objects as functions arguments in java
WAP to calculate addition of two distances in feets and inches using objects as functions arguments in java  WAP to calculate addition of two distances in feets and inches using objects as functions arguments in 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-Tutorials

Learn Java for beginner
ranging from the addition of two numbers to write games, animations and a lot more. One way to learn Java is through online training. Here a beginner in Java... and is the main reason behind its popularity. More and more students are opting to learn Java

Java Beginners

how to calculate addition of two distances in feets and inches using objects as functions arguments
how to calculate addition of two distances in feets and inches using objects as functions arguments  how to calculate addition of two distances in feets and inches using objects as functions arguments in java

General

Calculate the Sum of three Numbers
Calculate the Sum of Three Numbers       This is simple java programming tutorial . In this section you will learn how to calculate the sum of three numbers by using three

Java Beginners

Output Previous or Next Day of the Month
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... the if...then...else construct and (2) to start using some of the Java API's, by using the String

Java Beginners

Matrix Addition using RMI in Java
Matrix Addition using RMI in Java  Source Code for Matrix Addition using RMI in Java

SQL Question

mysql difference between two numbers
mysql difference between two numbers  How to get total bate difference between two dates for example 1/01/2012 and 1/02/2012 in MYSQL?   Select DATEDIFF(DAY, CONVERT(DATETIME, '01/01/2012', 103), CONVERT(DATETIME

JSP Servlet Questions

adding two numbers with out using any operator
adding two numbers with out using any operator  how to add two numbers with out using any operator   import java.math.*; class AddNumbers { public static void main(String[] args) { BigInteger num1=new

Java-Tutorials

Easiest way to learn Java
There are various ways to learn Java language but the easiest way to learn..., video tutorials and lectures that help beginners learn in Java. This tutorials..., Java classes, etc are covered. To make it easy for novices to learn

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

Java Code Examples

Java Find Automorphic numbers
Java Find Automorphic numbers In this section, you will learn how to find the automorphic numbers between 1 and 1000. Automorphic numbers are the numbers... of number 6 at the end. Here we are going to find the automorphic numbers between 1

Java Beginners

learn
learn  how to input value in java

Java-Tutorials

Best way to learn Java
Best way to learn Java is through online learning because you can learn it from the comfort of your home. Online learning of Java is also free, the only... tutorials Comparing Two Numbers Determining the largest number

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

how to add to numbers in java
how to add to numbers in java  how to add to numbers in java

General

Swap two any numbers (from Keyboard)
Swap two any numbers (from Keyboard)       This is a simple Java Oriented  language program. If  you are newbie in Java programming then our tutorial and example

Java Beginners

To find first two maximum numbers in an array,using single loop without sorting array.
To find first two maximum numbers in an array,using single loop without sorting array.  Java program to find first two maximum numbers in an array,using single loop without sorting array

Java Beginners

To find first two maximum numbers in an array,using single loop without sorting array.
To find first two maximum numbers in an array,using single loop without sorting array.  Java program to find first two maximum numbers in an array,using single loop without sorting array

JavaScript Questions

defining numbers in Java Script
defining numbers in Java Script  Explain about defining numbers in Java Script

Java-Tutorials

Learn Java in 24 hours
In this section we have explained about the concept of Array in Java. Add Two Numbers in Java This simple Java example tells you of how to add two numbers. We... array list, linked list, adding two numbers, wrapper class, etc. so that you can

Java Beginners

generating random numbers - Java Beginners
*60 = 60). So the errors are 10 and 0 for the two predictions with an average

Java Beginners

java operators - Java Beginners
java operators  Hello...........Can we perform addition of two numbers without using any arithmatic operator?  Hi Friend, Yes, you can use BigInteger class to add, subtract,multiply,divide the numbers: import

Java Technology Tutorials

Java write even numbers to file
Java write even numbers to file In this section, you will learn how to write the even numbers to file. By using the PrintWriter class, you can write any type... started a loop for numbers 1 to 50. If the number is totally divided by 2

Java Code Examples

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

Java Beginners

automorphic numbers
automorphic numbers  how to find automorphic number in java   Hi Friend, Pleas visit the following link: Automorphic numbers Thanks

Java Beginners

Finding all palindrome prime numbers - Java Beginners
Finding all palindrome prime numbers  How do i write a program to Find all palindrome prime numbers between two integers supplied as input (start and end points are excluded

Java Beginners

How to get the Day name
How to get the Day name  Hi, I am a beginner in Java and new to this web world as well. have a requirement to implement in my assignment project as below: We need to add the days in input date such that it create the date

General

Two Element Dividing Number
Dividing Two Numbers in Java       This is very simple java program. In this section we will learn how to divide any two number. In java program use the class package

Java Beginners

prime numbers - Java Beginners
prime numbers  Write a java program to find the prime numbers between n and m

Java Beginners

two dimensional - Java Beginners
two dimensional  write a program to create a 3*3 array and print the sum of all the numbers stored in it.  Hi Friend, Try the following code: import java.io.*; import java.util.*; public class matrix

Java Beginners

Addition to my previous post - Java Beginners

Java Beginners

Hey Guys really need to learn - Java Beginners
u will use scanf(%d%d%d, & month, day, year). How can i do this in java...Hey Guys really need to learn  Im a java beginner and i want to know...){ System.out.println("Enter three numbers:"); Scanner input=new Scanner(System.in

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

Java Beginners

How can I learn Java?
concepts of Java. All these things you can find in our Learn Java in a day section...How can I learn Java?  Hi, I have just completed a course in HTML.... Now I want to learn Learn Java programming and become the expert in Java

Java-Tutorials

How to learn Java?
If you are want to be a Java developer in future and are wondering how to learn Java language than there are two ways you can do that. One is the classroom... training. A young developer who is seeking a career in Java can learn the language

Java Beginners

Prime Numbers
Prime Numbers  Create a complete Java program that allows the user to enter a positive integer n, and which then creates and populates an int array with the first n prime numbers. Your program should then display the contents

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

General

Rounding off in Java - Round two decimal places
Rounding off in Java - Round two decimal places  ... to round the figure up to two decimal places in java.  Round... numbers are rounded into the above methods and shows the number in two figures

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

General

Comparing two dates in java
Comparing two dates in java In this example you will learn how to compare two dates in java.  java.util.Date provide a  method to compare two dates... date. The example below compares the two dates. import

Java Beginners

random numbers - Java Beginners
random numbers  write a program to accept 50 numbers and display 5 numbers randomly  Hi Friend, Try the following code: import...); System.out.println("Enter 10 numbers: "); for(int i=0;i<10;i

Mobile Applications Questions

this code gives addition of 2 numbers in j2me..but the code is not executing ..can u pls find out the error...??
this code gives addition of 2 numbers in j2me..but the code is not executing ..can u pls find out the error...??  import javax.microedition.midlet....=new Form("Addtion of two numbers"); // result=new Command("Result

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 Tips and Examples

Concatenating two Strings in Java
Concatenating two Strings in Java In this section we will help you, how to concatenate two strings in java. String are sequence of character which is used... that concatenate the two strings. String str1="hello"; String str2=" Java

Java Beginners

Adding two numbers  Accepting value ffrom the keyboard and adding two numbers

Java Beginners

recursion numbers - Java Beginners
recursion numbers  I need to use recursion to test all values from 0 to 20 and see if they are contain in a 1-D array with values: 2,4,6,8,10,12,14,16,18,20. The results of all numbers from 0-20 will be printed

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 Beginners

Perfect Numbers - Java Beginners
+ 2 + 3 Write a java program that finds and prints the three smallest perfect numbers. Use methods   Hi Friend, Try the following code: public

Java Tips and Examples

Learn Java - Learn Java Quickly
Learn Java - Learn Java Quickly       Java is an object oriented programming language... in two steps. First the programs written in Java or the source code translated

Java Beginners

random numbers - Java Beginners
to display the random numbers, but not twice or more. I mean i need a number to be display once. This code allows some numbers to be displayed more than once. Hi... Scanner(System.in); System.out.println("Enter 10 numbers: "); for(int i=0;i<10;i

Java Beginners

Generating random numbers in a range with Java
Generating random numbers in a range with Java  Generating random numbers in a range with Java

Java Interview Questions

Java program - convert words into numbers?
Java program - convert words into numbers?   convert words into numbers?   had no answer sir

General

Calculate sum of even and odd numbers in Java
Calculate sum of even and odd numbers In this section, you will learn how to read the file that contains even and odd numbers and calculate their sum separately. To do this, first of all, we have found all the even and odd numbers from 1

Java-Tutorials

9 Invincible Reasons to learn Java
Check the 9 Invincible Reasons which to learn popular Java Programming... of the key reasons that inspire people to learn Java. 1. Gradually lowering... and sustainability. The java programmers are outraging in numbers and more and more

Java Beginners

permutstion of numbers in java
permutstion of numbers in java  Is it possible to enter the number in a char so that permutation of a number can be acheived which will be in the form of string????? here is the coding i did...it worked really well when i

Java-Tutorials

How to learn Java easily?
Java learning. The students opting to learn Java are of two types, either...If you are wondering how to learn Java easily, well its simple, learn... a simple language and easy way to understand and learn the language. Java on its

Java Beginners

Two- Dimensional Array - Java Beginners
Two- Dimensional Array  I am new in java programming. I am creating a two-dimensional array. This is my code ** class BinaryNumbers { public static void main(String[] args) { //create a two-dimensional array int ROWS = 21

Java Beginners

Java Pyramid of Numbers
Java Pyramid of Numbers  Hi, I want to know how the code to print the pyramid below works. It uses nested for loops. Pyramid: 1 2 1 2

Java Beginners

Listing all even numbers between two numbers
Listing all even numbers between two numbers  Hi, How to write code to list all the even numbers between two given numbers? Thanks   Hi... the numbers. Check the tutorial Write a program to list all even numbers between two

General

Dividing of two Matrix in Java
;Here you will learn how to use two matrix array for developing Java program. ... Dividing of two Matrix in Java       In this Section we will learn how to get divide of two

Java Beginners
Java Beginners

How to learn programming free?
, Here are the tutorials: Beginners Java Tutorial Learn Java in a day Master Java...How to learn programming free?  Is there any tutorial for learning Java absolutely free? Thanks   Hi, There are many tutorials on Java

Java-Tutorials

Learn Java for beginners
Beginners can learn Java online though the complete Java courses provided at Roseindia for free. This Java course covers the whole of Java programming... a programmer from basic to advance level of Java. New programmers prefer to learn Java

General

Find HCF of three numbers in Java Program
Find HCF of three numbers in Java Program In this java tutorial section, you will learn how to determine the HCF (Highest Common Factor) or GCD (Greatest Common Divisor) of three numbers. As you already know that HCF or GCD

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 Java In A Week After completing the above two tutorials series you can

Java Code Examples

Java Find Median
Java Find Median In this tutorial, you will learn how to find the median of numbers. There is no built in method to find the median of a list of numbers in the Java framework. But you can create your own method when you need to find

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-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

Java Beginners

How much time it takes to learn Java
, You can learn the basics of Java in a day. Read our tutorial Learn Java in a day...How much time it takes to learn Java  Hi, As a beginner in programming how much time it will take to learn Java programming? I have little

Java Interview Questions

EVEN NUMBERS - Java Interview Questions
EVEN NUMBERS  i want program of even numbers?i want source code plz reply?  Hi Friend, Try the following code: class EvenNumbers... counter = 0; System.out.println("Even Numbers are:" ); for (int i

Java Code Examples

Java find prime numbers without using break statement
Java find prime numbers without using break statement In this tutorial, you will learn how to find the prime numbers without using break statement. You all are aware of Prime Numbers, these are the numbers which are either divided