Home Answers Viewqa Java-Beginners full description of program code

 
 


Nishant Jain
full description of program code
1 Answer(s)      2 years and 3 months ago
Posted in : Java Beginners

import java.util.*; class StringExample6 { public static void main(String[] args) { Scanner input=new Scanner(System.in); System.out.println("Enter string:"); String str=input.nextLine(); StringTokenizer stk=new StringTokenizer(str); String vowels="",consonants=""; while(stk.hasMoreTokens()){ String token=stk.nextToken(); if(token.startsWith("a")||token.startsWith("e")||token.startsWith("i")||token.startsWith("o")||token.startsWith("u")){ vowels+=token+" "; } else if(!token.startsWith("a")||!token.startsWith("e")||!token.startsWith("i")||!token.startsWith("o")||!token.startsWith("u")){ consonants+=token+" "; } } System.out.println("Second Output: "+vowels.concat(consonants)); } }

above a program code of reverse string program in this program user input a string and print all vowel worts at start and end all consonant. i've a problem that plz describe me full description of this code thanks

View Answers

February 24, 2011 at 1:06 PM


In the above code, we have used StringTokenizer class that splits the string on the basis of " ".The method hasMoreTokens() of this class searches the words or tokens till the end of the string. The method nextToken() finds the word. If that word or token starts with a or e or i or o or u, then the word will store into the string vowels, otherwise the words will get stored into the string consonants. At last we have concatenated both the strings.









Related Pages:
full description of program code
full description of program code  import java.util.*; class.... i've a problem that plz describe me full description of this code thanks...(consonants)); } } above a program code of reverse string program in this program
full description of program code
full description of program code  import java.util.*; class...(consonants)); } } Describe me in deeply full detail of above program code how.... This is the full description for your second output
full description of program code
full description of program code  escribe me below code how this program code is make and work, and those method is use in this why? import java.util.*; class SortList { public static void main(String[]args) { Scanner input=new
Description
THIS PROGRAM AND WHATS THE WORKING OF EVERY LOOP   The above code
Description
THIS PROGRAM AND WHATS THE WORKING OF EVERY LOOP   The above code
Description
THIS PROGRAM AND WHATS THE WORKING OF EVERY LOOP   The above code
Description
THIS PROGRAM AND WHATS THE WORKING OF EVERY LOOP   The above code
code for program
code for program  hello,I am new to java and need to get the code for a program,i've been trying all sorts of code and nothing works any help would be appreciated.Below is what the program should output with the user's input
program code
program code  I need to get the code for the following,the user's input are enclosed in curly brackets,thank you. HARDWARE ITEMS CODE DESCRIPTION... 23} ADDRESS-2: {Building 8} ADDRESS-3: {Winchester} POST CODE: {89763} ENTER
Download full code of JSF, Spring and Hibernate based Registration program
Download full code of JSF, Spring and Hibernate based Registration program...; From this page you can download the source code of the application. Downloading code Click here to download the code of the application. Extracting
Description of Database Table
the detail description of table. When the program will gets execute then it will show... is not executed!". Description of code: DESCRIBE table_name; This code is used... NULLABLE: column can be null. Here is the code of program
Full path of image to save it in a folder
Full path of image to save it in a folder  Sir ,I am trying to upload a file but only sends file name as parameter. I want a code that would help me.... code is given below:- package pack; import java.io.*; import
how to get description for each file
file if the user select 10 file to upload........get the description for each file without description dont upload..... u have any idea......code...how to get description for each file  hi, how to get description
program code for this question - Java Beginners
program code for this question  QUESTION 1: Electricity Bill Tshubang.... Program should send each customer?s bill to a text file whose name is the customers?s... the customer?s account number, full name and their outstanding balance and the message
You asked full source code for search - Development process
You asked full source code for search  Hi, For this code can u give me code for display records when i select any field Search Page var arr = new Array(); arr["Select"] = new Array("-select
browsers full screen without toll bar
browsers full screen without toll bar  hi , i want to full screen mode of my browser without toll bar and address bar i have already trial below code , its just enlarge screen without all other option window.open('screen.jsp
program code
program code  login and registration form for shopping cart using struts-hibernate with oracle database connection
who know full coding of guessing game in java?
who know full coding of guessing game in java?  There is only 1... a number. The program should display user win if the number user has guess... the correct number. The program should allow player to have options either to play
code for a program
code for a program   Write a program which has 2 numbers. There should be an option to add, multiply, divide and subtract these numbers a. If user opts "A" - Add the 2 numbers b. If user opts "S" - Subtract the numbers c
Hibernate Life Cycle
This tutorial contains full description of Hibernate life cycle
Program Error - WebSevices
Program Error  Hello Friends, Write the simple php program Using Zend framework with Database connection .Anyone know the code... full code then i will give you proper solution according to your requirement
Website Description Data Scraper & Image/Thumbnail Generator
Website Description Data Scraper & Image/Thumbnail Generator   I need Image/Thumbnail Generator code in java. Please help me
Website Description Data Scraper & Image/Thumbnail Generator
Website Description Data Scraper & Image/Thumbnail Generator   This is yhoo I need Image/Thumbnail Generator code in java. Please help me
Regarding Login application program
" and ActionClass is "myAction". the following code is written in myAction class... Status 500 - type Exception report message description The server encountered...(ReplyHeaderFilter.java:96) note The full stack trace of the root cause is available
i need program or code for this program
i need program or code for this program  out should be in this form 1 2 3 4 5 6 3 5 7 9 11 8 12 16 20 20 28 36 48 64 112
program not compiling
; String description; double price; HardwareItems(String code,String description,double price){ this.code=code; this.description=description..."); System.out.println(); System.out.println("Code "+" Description
How can I get the full URL with the attached parameters? - JSP-Servlet
How can I get the full URL with the attached parameters?  Hi, I'm...:8080/MesEduSchoolsProject/displayMenu.jsp How can I get the full URL with the attached parameters? Thanks Sudha  Hi Friend, You can try the following code
program code - JSP-Servlet
program code  what is the program code for LOGINFORM USING SERVLETS? RESPOND SOON
program code - JSP-Servlet
program code  what is the program code for LOGINFORM USING SERVLETS? RESPOND SOON
Match EJB roles with the corresponding description of the role's responsibilities, where the description may include deployment descriptor information.
with the corresponding description of the role's responsibilities, where the description... with the corresponding description of the role's responsibilities, where the description may include deployment descriptor information. There are 6
modify program
. address 1: address 2: address 3: post code: code: quantity: the is the program... { String code; String description; double price,total; double...,String description,double price){ this.code=code; this.description
java code for accept city name and gives temparature,wind speed,humidity exts along with description
java code for accept city name and gives temparature,wind speed,humidity exts along with description  java code for accept city name and gives temparature,wind speed,humidity exts along with description
code
code  code for android sample program
link in the field of table on clicking he link the full data will displayed
link in the field of table on clicking he link the full data will displayed   Hello... I am learning jsp and mysql. I am facing some problem. I am... with this problem. Please suggest me with some simialr code example. Expecting your
applet program code - Applet
applet program code  hello sir, i did't get the code for below problem... please help me... 1.An applet program to draw a line graph for y=2x+5.[for suitable values of x & y
full coding
full coding  class IdentifyMyParts { public static int x=7; public int y=3;} IdentifyMyParts a = new IdentifyMyParts(); IdentifyMyParts b = new IdentifyMyParts(); a.y = 5; b.y = 6; a.x = 1; b.x = 2; System.out.println("a.y
java program code
java program code  can any one write a program (class) which will have two methods Fibonacci and Factorial, which will be a void and a return respectively. i will be glad if it can have a good display results
program
and invoke the setEmployeeDetails and print method. Document your code and follow
decription of program code
decription of program code  Describe me below code how this program code is make and work, and those method is use in this why? import java.util.*; class SortList { public static void main(String[]args) { Scanner input=new
program code - Java Beginners
program code  Design and write a Java application that takes as input a single letter and displays the corresponding digit on the telephone..., This code will be helpful to you in solving your problem. import java.util.
code
the correct code for a program.The output of the program is listed below...: {Block 5} ADDRESS-3: {San Juan} POST CODE:{6745} ENTER CODE (XX TO stop) CODE:{FF1} QUANTITY:{2} CODE:{TR4} QUANTITY:{1} CODE:XX INVOICE FOR YOUR ORDER Harry
description about jdk 1.5 features - Hibernate Interview Questions
description about jdk 1.5 features  Hi. Please can anyone provide the details description regarding the new features available in jdk 1.5....  Hi friend, JDK : JDK is a software development program provided
code
code  write a program to encrypt and decrypt the cipher text "adfgvx"   Hi Friend, Try the following code: import java.security.*; import javax.crypto.*; import javax.crypto.spec.*; import java.io.
complete the code (palindrome) - Java Beginners
is the standard code with full of description,so go according that u will sure find...complete the code (palindrome)  Write a program that checks if a word... to left. Words like "tooth" and "feet" are not palindromes. The program prompts
JSP code
JSP code  I get an error when i execute the following code : <... description The server encountered an internal error () that prevented... The full stack trace of the root cause is available in the Apache Tomcat/7.0.23
Small program code - Java Beginners
Small program code  Develop the echo server and the echo client program that display whatever is typed in the server on to the client
Show Graphics on full Screen
on full Screen       This section illustrates you how to show graphics on full screen. To display... device, method getDisplayMode() is used. To displays the full screen mode
source code program - Java Beginners
source code program  I need the source code for a program that converts temperatures from celsius to fahrenheit and vice versa, as well as converting kilometers to miles and vice versa using Java "classes".  Hi
DOJO full form
DOJO full form  what is the full form of dojo

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.