Ακυρώθηκε

Small Java homework for school -- 2

Write a program that has the main method and another method called parseString.

The parseString method:

• is public

• is static

• does not return a value

• has one parameter of type String

• takes the individual characters in the String passed as an argument, capitalizes them and separates them by a hyphen

• it then prints the resulting string to the output console

For example, if the method was called from the main method passing the string “hello”, it should print to the output console the string: “H-E-L-L-O”.

To test the parseString method, you may call it multiple times from the main method passing different strings.

The following is the header for the method:

public static void parseString(String str)

{

// provide your implementation here

}

Hints:

My solution involved writing a for loop to get the individual characters in the String argument.

I also used the length, charAt and toUpperCase methods of the String class; as well as the toString method in the Character class to convert a char value to a String value.

You, of course, don’t have to use the same solution I did, but make sure that your method works correctly regardless of the string that is passed as an argument.

Δεξιότητες: Java, Javascript

Δείτε περισσότερα: java file system implementation, school project java, java small projects, school system java project, school election java program, java socket server implementation, java syslog server implementation, java video streaming implementation, java small project, school manager java source, java mobile game implementation row

Σχετικά με τον Εργοδότη:
( 13 αξιολογήσεις ) Miami, United States

ID Εργασίας: #11805408

7 freelancers κάνουν προσφορές με μέσο όρο $20 γι' αυτή τη δουλειά

$10 USD σε 1 μέρα
(33 Αξιολογήσεις)
4.9
ig149

JAVA Expert here , Can do your project in 15 minutes..............................................................................................

$15 USD σε 1 μέρα
(60 Αξιολογήσεις)
5.2
adeel94

i'm an experienced JAVA developer with solid background of JAVA SE/EE, Multi-threading, Swing and API integrations. you'll get your job done perfectly. have a look on my reviews and portfolio

$10 USD σε 1 μέρα
(16 Αξιολογήσεις)
4.0
AdeelAslam4

Hi there! I have read what you exactly need, however I would like to ask you a few questions. I wouldn't call myself a master but I do work smart and do not rest until I get the job done. Please feel free to ping me an Περισσότερα

$66 USD σε 1 μέρα
(1 Αξιολόγηση)
3.2
$10 USD σε 1 μέρα
(5 Αξιολογήσεις)
2.6
SabidHabib

i can implement your method in 30 minutes. Knock me ...........................................................

$15 USD σε 0 μέρες
(11 Αξιολογήσεις)
2.5
$15 USD σε 1 μέρα
(1 Αξιολόγηση)
1.7
atiburrahman09

Hello Sir, I have just seen your Job posting and upon reading thoroughly, I felt strongly that I would be the most qualified contractor for your Web Development project. Over the last couple of years, I have provid Περισσότερα

$15 USD σε 1 μέρα
(0 Αξιολογήσεις)
0.0