This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Dec 13th, 2012  |  syntax: Java  |  size: 0.27 KB  |  views: 20  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. public class Main
  2. {
  3.         public static void main(String[] args)
  4.         {
  5.                 String dashes = "___";
  6.                
  7.                 char[] charArray = dashes.toCharArray();
  8.                
  9.                 charArray[1] = 'o';
  10.                
  11.                 dashes = String.copyValueOf(charArray);
  12.                
  13.                 System.out.println(dashes); // will output _o_
  14.         }
  15.  
  16. }
clone this paste RAW Paste Data