Comment

khalid
simple,
March 11, 2008 at 2:55 PM

public static void main(String[] args) {
int a = 5;
int b = 7;
System.out.println("Addition of two numbers!");
int sum = a + b ;
System.out.print("Sum is: "+sum);
}
}

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 write a simple Java program. You just need  

Java Beginners

learn
learn  how to input value in java 

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 

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 

Java Beginners

Simple Java Projects
Simple Java Projects  Hi, I am beginner in Java and trying to find Simple Java Projects to learn the different concepts on Java. Can anyone tell me where to get it? Thanks 

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

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 

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

Simple Form in Java
Simple Form in Java       This is a simple program of java awt package which constructs a look like a form by using various java component. In this section, you will learn how 

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

developing simple web service
: The Web Services Invocation Framework (WSIF) is a simple Java API...Open Source web services tool in java   .../ About Axis: Apache Axis is an implementation of the Simple Object 

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 

JavaScript Tutorial

Simple Calculator Application In Java Script
Simple Calculator Application In Java Script       In this article you learn... Calculator The objective of this project is  learn how to write a simple 

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

Simple FTP upload in Java
Simple FTP upload in Java  How to write a program for Simple FTP upload in Java? Any code example of Simple FTP upload in Java will be very helpful for me. Thanks 

Java Beginners

simple pgm
simple pgm  a java program which uses super class 

Java Beginners

simple calculator - Java Beginners
simple calculator  how can i create a simple calculator using java codes?  Hi Friend, Please visit the following link: http://www.roseindia.net/java/example/java/swing/calculator-in-swing.shtml Thanks 

Java Beginners

Simple java applet
Simple java applet  Create a Java applet to display your address on the screen. Use different colors for background and text   Please visit the following link: Applet Examples 

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 

JSP Servlet Questions

simple java search engine
simple java search engine  i have already downloaded the project simple java search engine.but i am not able to run it.can anyone help me.i have.... ABSTRACT Title : Simple Search Engine System Specification: The system on which 

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 

Spring Framework Questions

java spring simple application
java spring simple application  hai I have design a simple application in this I always found class not found exception. I am sendig code as follows please resolve this and send me.my directory structure is as follows Project 

Java Beginners

Simple Java Calculator - Java Beginners
Simple Java Calculator  Write a Java program to create simple Calculator for 4 basic Math operations, Addition, Subtraction, Multiplication..., Please visit the following link: http://www.roseindia.net/java/example/java 

Java Beginners

simple code - Java Beginners
simple code  to input a number and check wether it is prime or not and print its position in prime nuber series.  Hi friend, Code to help in solving the problem : import java.io.*; class PrimeNumber { public 

Java Beginners

Simple ATM Java Code...
Simple ATM Java Code...  You are required to write a Graphical User Interface that simulates an ATM by building on the program you wrote for the midterm exam. Specifically, you will be reading customer information into an array 

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 

Java Beginners

A simple question - Java Beginners
A simple question   Design a program to calculate either the square of a number or the square root of a number and display the results. output should be like:- Enter a float value: 6.2 Do you want the (s)quare or square (r 

Java Beginners

Simple Java Desktop Upload application
Simple Java Desktop Upload application  I try do simple example for upload applicationtake file from c:\ put to d:\ :) PLEASE HELP 

Java Beginners

Simple Java Question - Java Beginners
Simple Java Question  [color=#0040BF] Dear All, I have a huge text file with name animal.txt, I have the following sample data: >id1 lion >id2 horse cat >id3 mouse tiger I need to save the contents 

Java Beginners

Java simple question - Java Beginners
Java simple question  I have to design a program for a trucking company that has 7 trucks in its fleet. Each truck is identified by a number, 1-7. Each also has a maximum weight. Assign the max weight limit to each truck 

Java-Tutorials

Simple Java Programs
Simple Java Programs In this section we will discuss about the Java programs This section will describe you the various Java programs that will help you... learner can learn how to write first program in Java.  Java Constructor 

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 

Java Beginners

Simple IO Application - Java Beginners
Simple IO Application  Hi, please help me Write a simple Java application that prompts the user for their first name and then their last name. The application should then respond with 'Hello first & last name, what 

Java Interview Questions

Simple banking system using Java
Simple banking system using Java  I am trying to make a simple banking system that has only 3 interfaces which does not connect to the database... inheritance in java please help.Thank you 

General

Simple Date example
Simple Date example       In this section we have presented a simple Date example.... Parameterized constructor :- Date(int year,int month,int day) creates 

Java Beginners

How to write a simple java applet
How to write a simple java applet   Hi, how can i write a simple java applet, displaying text in specific colors and font style. For example, the output will be something like : Name in red color Age in blue color Nationality 

Programming Tutorials

Java: Example - Simple Calculator
Java: Example - Simple Calculator Here is the source for the simple... (Calc.java) - A simple main program. User interface (CalcGUI.java... place. Altho this simple example doesn't show the full power of separating 

PHP Tutorial

PHP Registering simple statistics
PHP Registering simple statistics Have you ever wanted to know who visited... ! In this tutorial I will teach you how to make a simple PHP Script that writes... that they visited ! This program follows a simple algorithm as follows: 1. Grab 

General

Writing Simple Java Script Program
Writing Simple Java Script Program       In this article you learn the basics... JavaScript Program In the last lesson you learned how to create simple java script 

Java Beginners

Java simple reference source - Java Beginners
Java simple reference source  Hi, please could you recommend me a Java simple reference source (on line or e-book) where I could quickly find..., this is not exactly what I am looking for. Let me explain. I'm a Java beginner writing 

Java Beginners

simple program question
simple program question  how do i get a java program to take an input from the user and have it terminate by a period and not by pressing enter 

Java Beginners

Simple Java class program - Java Beginners
Simple Java class program  Hello, Please help me, Write a simple class that iterates through all the arguments passed in on the command line.... http://www.roseindia.net/java/example/java/util 

Java Beginners

Simple Java class program - Java Beginners
Simple Java class program  Hi sir, Please help me Write a simple class that iterates through all the arguments passed in on the command line...(); } } -------------------------------------------- Read for more information. http://www.roseindia.net/java 

Java Beginners

simple team leader
simple team leader  Could you please help me to write a program for a simple team leader?   Please clarify your problem. Which type of program you want to create in java? Please specify 

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 

JSP Tutorials

Developing Simple Struts Tiles Application
will show you how to develop simple Struts Tiles Application. You will learn... Developing Simple Struts Tiles Application  ... language="java" %> <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix 

Java Beginners

write simple java code - Java Beginners
write simple java code  Write a program that creates a simple calculator .The user enters two numbers in the text fields, Number 1 and Number 2. There are 4 buttons, labeled with ?Add?, ?Substract?, ?Multiply? and ?Divide 

JSP Servlet Questions

how to get session object in simple java class??
how to get session object in simple java class??  i am fallowing a simple mvc architecture. actually my problem is.... i am using 4 classes in my...) GroupDetailsDao.java (it is also a simple java class which have the jdbc logic 

Applet Questions

Simple Java applet that need usernam, password and textfield.
Simple Java applet that need usernam, password and textfield.  Hi. Anyone can help me on this matter: I need to create a small application that require user to login by username and password. After login, they should meet 

JSP Servlet Questions

Help me to write this simple java frame program
Help me to write this simple java frame program   I want to write a Java program for.... To create a frame with 4 text fields;name,street,city and pin;with suitable labels. Also add a button "OK". After enter values 

Java Server Faces Questions

JSF Simple question - Java Server Faces Questions
JSF Simple question  I have h:dataTable (with 10 position) i need write simple jsf file that represent only 5 position and on another page last 5 position . How can i proceed from first page to second 

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

Simple Editor
Java: Example - Simple Editor This simple text editor uses a JTextArea with Actions to implement the menu items. Actions are a good way... // editor/NutPad.java -- A very simple text editor -- Fred Swartz - 2004-08 

Java Tips and Examples

Example - Simple Calculator
Java: Example - Simple Calculator Here is the source for the simple...) - A simple main program. User interface (CalcGUI.java... place. Altho this simple example doesn't show the full power of separating 

JDBC

Simple JDBC Example
.style1 { text-align: center; } .style2 { background-color: #FFFFCC; } Simple JDBC Example To connect java application to the database we do...,'John',B.Tech') ; A Simple example is given below to connect a java 

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

Java Magazine Questions

java
, and business applications. Advantages of Java: * Java is simple, easy to design , easy to write, and therefore easy to compile, debug, and learn than any other...java  what is java   Java is a programming language 

Java Tips and Examples

Simple Linked Lists
Java Notes: Simple Linked Lists This shows three programs. A simple... as simple as the singly-linked list, but makes some operations easier... it hides the details. Simple singly-linked list done "by hand 

Java Beginners

Java compilation error - Java Beginners
://www.roseindia.net/java/learn-java-in-a-day/download-and-install-java.shtml b) Close... at http://www.roseindia.net/java/learn-java-in-a-day/download-and-install... running simple core java program on command prompt.java is installed on my pc 

General

Very simple `Hello world' java program that prints HelloWorld
Hello World Java Simple Java Program for beginners (The HelloWorld.java) Java is powerful programming language and  it is used to develop robust applications. Writing a simple Hello World program is stepwise 

Java Tips and Examples

Simple Linked List Exercise 1
Java Notes: Simple Linked List Exercise 1 Name: ___________________________________________ Fill in the blanks to for this program that reads strings and puts them in a doubly linked list. 1 2 3 4 5 6 7 8 

Java Beginners

Need simple java code to start and stop the remote windows service.
Need simple java code to start and stop the remote windows service.  Hi, I Need simple java code to start and stop the remote windows service. Example:There are two servers 1) Server A and 2) Server B. If a notepad.exe file 

Programming Tutorials

Tools required to build Simple Cart
Tools required to build Simple Cart       Shopping cart application is written in Java and so... tools are required--- Java Development Kit (JDK), 1.4 or later. Apache Ant 

Java Beginners

java
for remote execution which require that only simple data types or defined structures be passed to and from methods, RMI allows any Java object type to be used - even..., you'll learn more about RMI 

Ant

Apache Ant - Building Simple Java Projects
Apache Ant - Building Simple Java Projects  ... will introduce you to Apache's Ant technology, which is a mean to build java projects.... Going through it, a beginner can easily and quickly learn how to use Ant 

Java Server Faces Questions

JSF Simple Login Application - Java Server Faces Questions
JSF Simple Login Application  Hi there, I have implemented all the things which you mentioned in " JSF Simple Login Application " . but as i insert USER_ID and PASSWORD then it is showing an exception which 

Java Beginners

basic java - Java Beginners
basic java  oops concept in java ?  Hi Friend, Please visit the following links: http://www.roseindia.net/java/beginners/oop-in-java.shtml http://www.roseindia.net/java/learn-java-in-a-day/oops.shtml Thanks 

Programming Tutorials

Java Tutorial
and install Java on your windows machine Go through our Learn Java in a Day tutorial. Then learn our Master Java In A Week tutorial... to learn java programming language from scratch then this the best place to start 

PHP Tutorial

PHP Date add 1 day
PHP Date add 1 day This simple code will tell you how you can easily add 1 day to a date.  Example code for PHP Date add 1 day: <?php...;.$todayDate."<br>"; //Add one day to today $date = strtotime(date 

Java Beginners

i want make a simple tools like turnitin using java
i want make a simple tools like turnitin using java  it just simple tools can select the file like .doc,.pdf,.txt..the tools can read inside the file and make a searching at internet and give the source the source come from where 

Programming Tutorials

Java zip package - Learn how to use java zip package.
Java zip package In this section we will learn about java.util.zip package of java library. We will also learn how to use the zip API to create and read... learn zip package of java with examples 

Swing AWT

create, edit ,open simple documents using java - Swing AWT
create, edit ,open simple documents using java   In my program I have a text area.How to create document which will contain text in text... want to use Java Swing or JSP? Do you want to create word document file 

Free Java books

Java Reference Books
, and more complexity was introduced. Ant evolved from a simple-to-learn build tool... and is suitable for anyone who programs with Java on a day-to-day basis... to explore and quickly learn about new packages. This need led to this book. The Java 

Spring Framework

Learn Features of Spring 3.0
. The Spring 3.0 Framework is released with the support of Java 5. So, you can use all the latest features of Java 5 with Spring 3 framework. The first... and released to simplify the development of Enterprise Java applications 

Programming Tutorials

Java nio package - Learn how to use java nio package.
Java nio package. In this section we will learn about the java.nio package... and its methods in java programming. The java.nio (known as java new input output) package was introduced in Java 1.4 which is broadly  

RDF

Simple Query on RDF file in Java
Simple Query on RDF file in Java   ... in this section we are going to describe how to run simple query on the RDF graph model. Now lets see the example that can fires a simple query. The example is going 

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... the main concepts in using XML in Java. A good way to learn is by hands 

General

Class Average Program
;  This is a simple program of Java class. In this tutorial we will learn how to use java program for displaying average value. The java instances of the class, represent classes and interfaces in a running Java application 

General

Simple Date Format Exception
Simple Date Format Exception       Simple Date Format Exception inherits from a package name... and normalization of date. Simple Date-format provides you to work on choosing any 

Java Beginners

Need someone to check and modify my simple code - Java Beginners
Need someone to check and modify my simple code   How to write a class that contains Variables that hold hourly rate of pay, number of hours worked. Display gross pay, withholding tax, which is 15% and net pay. I have tried 

Java Tips and Examples

Switch Statement example in Java
;    This is very simple Java program for implementing the switch statement. Here, you will learn how to use the switch statement in your java program for developing java application. This section provides you the best 

Maven 2

Create project from Maven Template
In this section, you will learn to create a simple Java web application project from Maven Template 

Hibernate-Tutorials

hibernate 3.5 maven
In this section, you will learn how to a generate simple java Hibernate 3.5 project using Maven project builder 

Hibernate-Tutorials

hibernate maven
In this section, you will learn how to a generate simple java Hibernate project using Maven project builder 

Java-Tutorials

Roseindia Java Tutorials
Java Quickly Learn Java In A Day Beginners Java Tutorials Java... with roseindia Java Tutorials is quite simple and easy, which will teach you... elaborately in easy and simple way. Java Tutorials roseindia are created 

Java Beginners

query in simple code..i had described all...........
query in simple code..i had described all...........  SAME HERE IF YOU GET THIS PROBLEM SOLVED THEN PLEASE REPLY......... MY ONE JAVA FILE IS: abstract class A { abstract void callmetoo() { System.out.println("anoop 

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.