Java Programming using array
I'm creating a programming using array that will accept 10 letters and test if those letters are consonant, then it will display on the screen. Please guide me.
Sample Output:
Enter 10 letters.
A
B
C
D
E
F
G
H
I
J
The Consonants entered are
B
C
D
F
G
H
Program:
import java.io.*;
public class Array {
public static void main(String args[]) throws IOException
{
BufferedReader k = new BufferedReader(new InputStreamReader(System.in));
char[] srcArray = new char[] = {'B', 'C', 'D', 'F', 'G','H','J','K','L','M','N','P','Q','R','S','T','V','W','X','Y','Z'};
char ch=;
System.out.println("Enter 10 letters");
for(int x=0;x<10;x++)
{
System.out.println(k.readLine());
}
if(ch==char[x])
{
//Don't know what to put here now.
}
else
System.out.println("Wrong Input!");
}
}
Help me out please.
View Answers
March 13, 2013 at 12:59 PM
hi friend,
Try this sample code may, this will be helpful for you.
package net.roseindia;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class CheckForVowel {
public static void main(String args[]) throws IOException
{
char n;
BufferedReader s=new BufferedReader (new InputStreamReader
(System.in));
System.out.println ("Enter letters : ");
String letter = s.readLine();
for(int i=0; i<letter.length(); i++)
{
n= letter.charAt(i);
if (n=='a'|| n=='e'|| n=='i'|| n=='o'|| n=='u'|| n=='A'||
n=='E'|| n=='I'|| n=='O'|| n=='U')
System.out.println ("Vowel = "+n);
else
System.out.println ("Consonant = "+n);
}
}
}
Related Tutorials/Questions & Answers:
Java Programming using arrayJava Programming using array I'm creating a
programming using array...
Program:
import java.io.*;
public class
Array {
public static void main(String args...','H','J','K','L','M','N','P','
Q','R','S','T','V','W','X','Y','Z'};
char ch
Java programming using ArrayList Help?Java programming using ArrayList Help? Hi,can anybody help and guide me on doing this
java program?
(Largest rows and columns)Write a program... and column indices with the most 1s.
Here are the output required:
Enter the
array Advertisements
Java programming using ArrayList Help?Java programming using ArrayList Help? Hi,can anybody help and guide me on doing this
java program?
(Largest rows and columns)Write a program... and column indices with the most 1s.
Here are the output required:
Enter the
array java programming using RMI - RMIjava programming using RMI Write a program
using RMI to sell an item to the customer remotely and don't allow the customer to purchase the item if the stock is nil , by displaying an appropriate message
How to using Binary Search Array Java ?How to
using Binary Search
Array Java ? Hi,
I am beginners in
Java Programming Language. I am trying to create small application
using Array functions. The problem is that how to use binary search
array in
Java. Please give
one dimensional array using javaone dimensional
array using java design and implement a
java program that will read a file containing numbers and compute the following statistics: the range(low,high) the average and the median
using arrayusing array Circular left shift
array element by one position
using arrayusing array Circular left shift
array element by one position
Java using Netbeans Object Oriented Programming Java using Netbeans Object Oriented
Programming I am trying to make... strings and a set of numbers for an
array. This
array is then sorted in descending... the ,average and mean values of the
array and returns that as another
array. My code
using arrayusing array display 10 digit number
using array and print pyramid.
1
1
1 1
1 1 1 1
1 1 1 1
Java Programming using Netbeans - IDE QuestionsJava Programming using Netbeans Hello Dear sir,
i got one scenario... & address
using netbeans jframe then i have to store these data into my package so... visit the following link:
http://www.roseindia.net/
java/example/
java/swing/add
using arrayusing array read 10 digit number and display (star
using 2D Arrayusing 2D Array Write a
JAVA program
using 2D
Array to auto-grade exams. For a class of N students,
your program should read letter answers (A, B, C... the class average. Define the exam answer key as Final
Array in your program
using 2D Arrayusing 2D Array Write a
JAVA program
using 2D
Array to auto-grade exams. For a class of N students, your program should read letter answers (A, B, C... the class average. Define the exam answer key as Final
Array in your program
Java - Array in Java
Array Example -
Array in
Java
Array:
Array is the most important thing in any
programming...:\chandan>
java array
Given number : 50 20 45 82 25 63
Ascending order
Java arrayJava array
Java program to find first two maximum numbers in an
array,
using single loop without sorting
array Using [] operator of EL with an ArrayUsing [ ] operator of EL with an
Array
....
An
array is a type of container which can hold a fixed
number of values of a single type.
Array is a collection of similar data types.
It means if you have declared
Use of Array in Java
Use of
Array in
Java
This
Java programming example will teach you the the
concepts of arrays so... way to create a
array is by
using new
operator. e.g.. : a = new int[5
Programming using applets and oracle - AppletProgramming using applets and oracle Develop an Online Examination software in
java using applets as front end and oracle as back end. Software should handle at least ten users at a time. There are Multiple Choice questions
Java ProgrammingJava Programming Hi,
What is
Java Programming? How I can learn
Java Programming in one month?
Thanks
What is Array in Java?What is
Array in
Java? Hi,
What is
Array in
Java?
How to create an
array in
Java and use it?
Thanks
Hi,
Array is very important in
Java as it is used heavily in
programming.
Array is
Java is a container object
java programming in question
Implement the program described above
using the
Java programming language...
java programming Companies and people often buy and sell stocks... will be
using a queue for storing data for FIFO accounting, and a stack
java programming in question
Implement the program described above
using the
Java programming language...
java programming Companies and people often buy and sell stocks... will be
using a queue for storing data for FIFO accounting, and a stack
Java array Java array How can one prove that the
array is not null but empty
ArrayArray can we create an
array of size 1 lakh in
java programming Java programmingJava programming To make a fraction to a representation base 16... by 16 gets the second digit and so on. Write a method that accepts an
array of digits (base 10) and creates and returns a new
array representing the same fraction
Java ArrayJava Array
a) Write an
array program that perform the following:
i) Declares a String
array initialized with the following strings: ââ?¬Å...?¬Â?.
ii) Write a loop that displays the contents of each element in the
array java programming of the string, not storing them in an
array and then finding the longest word
using.(without
using scanner class...
java programming WAP to find the longest word from a user given
java arrayjava array q4.array
Write a program that accepts two arrays, an
array of fruit names and an
array of price of
fruits, and a fruit name and returns the price of the fruit. (Assume that a price in the
second
array corresponds
Queue implementation using array.Description:
In this tutorial you will see how to implement queue
using array and queue insert & delete operations.
Code:
#include <stdio.h>
#define MAX 5
#include <stdlib.h>
void insert(int queue[], int *rear