[Show all top banners]

dhimaar1
Replies to this thread:

More by dhimaar1
What people are reading
Subscribers
:: Subscribe
Back to: Kurakani General Refresh page to view new replies
 Java help ........ plz respond quickly
[VIEWED 3294 TIMES]
SAVE! for ease of future access.
Posted on 02-22-08 11:11 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

guys i need help with this.

string s = nepal is beautiful.

so how do i find number of vowel "a" or number of consoant "L" from the string.

.


 
Posted on 02-22-08 11:20 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

just a flow chart only, i don't know much abt specific language, but should work.


count=0
for i=1 to length of s
    if s[i]="a" count++

end i

count is ur number of a


 
Posted on 02-22-08 12:07 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

public void strConvert () {

String myString = "nepal is beautiful.";

int countA = 0;

int countL = 0;

for (int i = 0; i < myString.length(); i++) {

if (myString.charAt(i) == 'a') {

countA++;

}

if (myString.charAt(i) == 'l') {

countL++;

}

}

System.out.println("Number of a = " + countA);

System.out.println("Number of l = " + countL);

}


 
Posted on 02-22-08 2:06 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

thanks for the help guys,....... i am taking my first ever programming class so  i am going little crazy figuring it out......anyway thanks for the time and help
 
Posted on 02-22-08 11:40 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

http://java.sun.com/docs/books/tutorial/
 
Posted on 02-24-08 6:19 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

dhimaar1 - i have an excellent book on Java called: Java: An eventful approach. I am sure you'll find it extremely handy...it's brand new but I am willing to sell it to you for as low as 50 bucks. If you want it do email!

 


 


Please Log in! to be able to reply! If you don't have a login, please register here.

YOU CAN ALSO



IN ORDER TO POST!




Within last 30 days
Recommended Popular Threads Controvertial Threads
TPS Re-registration case still pending ..
मन भित्र को पत्रै पत्र!
They are openly permitting undocumented immigrants to participate in federal elections in Arizona now.
Driver license help ASAP sathiharu
ढ्याउ गर्दा दसैँको खसी गनाउच
TPS Reregistration and EAD Approval Timeline.......
nrn citizenship
जाडो, बा र म……
Changing job after i-140 approval
Nepali **fake** Veterans. Be aware!!
Trasiting through Istanbul, Turkey
lost $3500 on penny stocks !!!
Is this a progressive step?
Nepalese Students Face Deportation over Pro-Palestine Protest
NOTE: The opinions here represent the opinions of the individual posters, and not of Sajha.com. It is not possible for sajha.com to monitor all the postings, since sajha.com merely seeks to provide a cyber location for discussing ideas and concerns related to Nepal and the Nepalis. Please send an email to admin@sajha.com using a valid email address if you want any posting to be considered for deletion. Your request will be handled on a one to one basis. Sajha.com is a service please don't abuse it. - Thanks.

Sajha.com Privacy Policy

Like us in Facebook!

↑ Back to Top
free counters