Remember Me
forgot your password?

Java Programming

It is high-level object-oriented programming language developed by Sun Microsystems in 1995. It is very similar to C++. It was used for the project set top box, was created by James Gosling in 1991. It is the modified from the language Oak. Oak was unsuccessful in the market. So Sun modified this language and changed its name to Java. It is very one of the popular programming language because of platform independent nature and used in both computer and electronic devices. Platform independent means write once and run anywhere, only Java Virtual Machine needed to run Java program on any platform.

_______________________________________________________________

First Program in Java

Before writing java code, please be careful when you write the java code because it is case sensitive language. I will explain later about"String[] args".

class HelloWorld {

public static void main(String[] args){

System.out.println("My First Program:Hello World!");


}

_____________________________________________________________________

What is the work of public static void main(String args[]) method in Java. Here is the explanation :

  • public : The public method can be accessed outside the class
  • static : We must have an instance to access the class method.
  • void : There is no need by application to return value. JVM launcher do this with it exists.
  • main() : It is the entry point for the java application.
  • String args[] : It holds optional arguments passed to the class.

____________________________________________________________________

Prime Number Program : Java Programming

This program explain you how to check the number is prime or not if user input the value from keyboard. Here is the source code :

import java.io.*;



class PrimeNumber {

public static void main(String[] args) throws Exception{


int i;

BufferedReader bf = new BufferedReader(

new InputStreamReader(System.in));


System.out.println("Enter number to Check:");

int num = Integer.parseInt(bf.readLine());

System.out.println("Prime number: ");


for (i=1; i < num; i++ ){

int j;

for (j=2; j<i; j++){


int n = i%j;

if (n==0){

break;

}

}


if(i == j){

System.out.print(" "+i);

}

}


}

}

For More : http://e-booksnetworking.blogspot.com/

Ahamed

Ahamed Razzan

Rate this Article: 0 / 5 stars - 0 vote(s)
Print Email Re-Publish

Add new Comment



Captcha

  • Latest Programming Articles
  • More from Ahamed

Integrating facebook in cakephp

By: Digisha Modi | 30/12/2009
FaceBook Application is the powerful tool of marketing or to connect people for all type of business. Now it's easier to find social applications on Facebook, on your phone, and on external websites. The new "Featured by Facebook" section highlights Facebook's favorites. Since 2007 the kind of concept FaceBook has come up with become a unique challenger to established payers. The benefit of FaceBook application is any one can post their own application with out any cost.

Outsourcing of iPhone Application Development Offers Profits for Developers as Well as Users

By: Arun Kumar | 30/12/2009
Being a 3G phone, it offers users the advantage of thrilling web access which helps them being on top of all online activities even on the move. Also, there are several additional applications available for download for the device. Thanks to the efforts of the outsource iPhone application development firms which have helped iPhone users get more with their devices using the apps developed by their expert developers.

Magento Template Integration

By: Digisha Modi | 30/12/2009
If you have purchased Magento template or simply need to integrate an existing graphic design template into your e-commerce shop we will integrate it into Magento for you. A web template is a ready- made web design need to be integrated. Usually web templates make possible a standardized layout (page arranging, colors, positions, etc.) for different web contents while using the same basic layout.

Magneto Template Designing

By: Digisha Modi | 30/12/2009
If you want your magento store to be very attractive and user friendly then we at Biztech Consultancy do it for you. We help in customizing the appearance of your Magento e-commerce store with Magneto’s powerful theming engine. Basically Magento theme is combination of layout, template and/or skin file(s) that create the visual experience of your store.

Pass4side 000-135 practice test

By: Adela1987 | 30/12/2009
Pass4side 000-135 Details: Pass4side is your source for the IT Exam 000-135 exam. With our 000-135 Exam Resources, you can be rest assured that you will Pass your 000-135 Exam on Your First Try. Our Exams are written and formatted by Top senior IT Professionals working in today is prospering companies and data centers. All of our practice exams including the IBM 000-135 exam guarantee you success on your First Try. 000-135 is a challenging exam,with our 000-135 study guide,you can feel safe wit

Open Source Development

By: Digisha Modi | 30/12/2009
Open Source Software are free applications released under special licensing terms where the core coding is viewable and able to be edited to suit the needs of the user. Open Source applications cover a myriad of uses - from entertainment to enterprise ecommerce. Open source software like Joomla, magento and osCommerce are very popular and widely used. They are content management system and it maintains track of every piece of content including music, videos, text, widgets, images and documents.

Cakephp PhpBB Integration

By: Digisha Modi | 29/12/2009
PhpBB Forum is a popular bulletin board script written in the server side scripting language PHP. Installable on most web servers, it is free open source Framework available under the GNU public license. The software allows website and forum administrators to set up unlimited number of forums and categories. It is also possible to create users, moderators and user groups with varying degrees of permissions.

Cakephp Amazon API Integration

By: Digisha Modi | 29/12/2009
The Amazon Web Service lets your cakephp web applications make queries to the huge database of products at Amazon and extract as much information as you need. The information you get in your application is exactly the same that is available on the Amazon website at that instant. The Amazon Web Service returns data in real-time, and updates automatically.

Top 3 Mozilla Firefox 4 Features

By: Ahamed | 22/08/2009 | Software
top 3 features for next Generation Browsing Experience

Java Programming

By: Ahamed | 21/08/2009 | Programming
java Programing Basic with sample program

Invisible mode - Gmail chat

By: Ahamed | 07/04/2009 | Information Technology
gmail hack tip and tricks

Configuring RIP Routing

By: Ahamed | 07/04/2009 | Networks
all about rip routing

ip version 6

By: Ahamed | 30/03/2009 | Networks
what is ip version 6

Access List

By: Ahamed | 05/03/2009 | Networks
what is access list? how to configure?

What Is Internetworking ?

By: Ahamed | 03/03/2009 | Networks
Internetworking involves connecting two or more computer networks via gateways using a common routing technology. The result is called an internetwork (often shortened to internet).

Submit Your Articles Free: Signup
Article Categories




Use of this web site constitutes acceptance of the Terms Of Use and Privacy Policy | User published content is licensed under a Creative Commons License.
Copyright © 2005-2008 Free Articles by ArticlesBase.com, All rights reserved. (0.30, 6, w3)