Results 1 to 2 of 2
  1. #1
    rabia-91 is offline Member
    Join Date
    Jan 2012
    Posts
    1
    Rep Power
    0

    Default Need urgent help! Total newbie!!

    i need an output of my initials. Also, there should be 5 spaces between each initial like this
    R R X X K K
    R R X X K K
    R R X K K
    R R X X K K
    R R X X K K

    to get this output will we just use simple printing method like
    system.out.println ( "R R" ....)

    Also, as i mentioned above i need 5spaces between each initial..so what do we do to get 5spaces in output?what is the code for that?
    i know the space is between two strings is given by putting a + in between like string1 + string 2..this must put only one space between the two strings right ? what is the code for getting 5spaces ?

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,331
    Rep Power
    25

    Default Re: Need urgent help! Total newbie!!

    what do we do to get 5spaces in output
    Put a String of 5 spaces where you want 5 spaces:
    String FiveSpaces = " ";
    output = var1 + FiveSpaces + var2;

    by putting a + in between like string1 + string 2..this must put only one space between the two strings right
    No the + is a concatenation operator. The two strings will be concatenated into one String without any space between them.

Similar Threads

  1. Running total little help
    By silverspoon34 in forum Forum Lobby
    Replies: 9
    Last Post: 02-27-2011, 09:19 PM
  2. Calculating Total?
    By ethemartian in forum New To Java
    Replies: 6
    Last Post: 02-21-2011, 04:09 AM
  3. [URGENT]SHA Encryption System...need urgent helps
    By java_idiot in forum New To Java
    Replies: 6
    Last Post: 05-02-2010, 10:04 AM
  4. newbie Needs urgent help
    By Gfunk in forum New To Java
    Replies: 1
    Last Post: 03-16-2010, 08:57 AM
  5. Total Newbie, Be Kind :)
    By dazza-s in forum New To Java
    Replies: 11
    Last Post: 04-26-2008, 10:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •