Home
Tutorials
Core Java
Introduction To Java
Java Evolution
Overview of Java
Constants, Variables and Data Types
Java Operators
Branching Statements
Looping Statements
Classes, Objects and Methods
Inheritance
Array, String and Vectors
Java Interfaces
Java Packages
Applet Programming
Graphics Programming
Advanced Java
Java AWT
Java Event Handling
Java File Handling
Java MultiThreading
Java Swing-I
Java Swing-II
Exception Handling
Socket Programming
Java Database
Java RMI
Java Servlets
Java Beans
Programms
Projects
Downloads
Contact
Java Programming
!doctype>
One Dimensional Array in Java
/* ======================================================= File Name : OneDimensionalArray.java WebSite : http://javaproglang.blogspot.in/ Facebook : https://www.facebook.com/AdvanceJavaProgramming Twitter : https://twitter.com/AdvanceJava Created By : Bintu Chaudhary ======================================================= */ import java.io.*; class OneDimensionalArray { public static void main(String args[]) throws Exception { int i=0; int a[] = new int[10]; String n; System.out.println("Enter the Elements"); BufferedReader obj=new BufferedReader(new InputStreamReader(System.in)); for(i=0;i< 5; i++) { n = obj.readLine(); a[i]=Integer.parseInt(n); } System.out.println("After the Inputting"); for(i=0; i< 5; i++) { System.out.println("a[ "+i+"]"+"="+a[i]); } } }
Download Complete Program
-
Read more »
No comments:
Post a Comment
No comments:
Post a Comment