How do you write a Java program that displays your initials in capital letters using the corresponding letter. For example, if your name is “John Doe”
JJJJJJJJJJJJ DDDDDDDDD
JJJJJJJJJJJJ
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
How do you write a Java program that displays your initials in capital letters using the corresponding letter. For example, if your name is “John Doe”
JJJJJJJJJJJJ DDDDDDDDD
JJJJJJJJJJJJ
System.out.println("JJJJJJJJJJJJ DDDDDDDDD");
Seriously though, which part of this are you having trouble with? Take a look at the String API for some useful functions.
Java Platform SE 6
Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
The letters need to form my initials in large capital letters. I'm having problems with the just forming the initial code to make the program form my initials like
cc c c c c c c c c
c
c
c
c
c c c c cc c c c c
Well, how would you do this by hand, with a piece of paper and a pencil? How do you know where to draw the letters in the first place? Pretend you have a really dumb friend who has no idea how to do this. Write instructions out for him (remember how dumb he is, so keep your instructions short and simple) that he could follow to accomplish the task. When you have that finished, you'll have an algorithm that should be pretty easy to translate into code.
Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!