fork download
  1. import java.util.*;
  2.  
  3. class Ideone {
  4. public static void main (String[] args){
  5. String[] array = {"01.um", "02.dois", "03.tres"};
  6.  
  7. for(int i = 0; i < array.length; i++)
  8. array[i] = array[i].split("\\.")[0];
  9.  
  10. System.out.println(Arrays.toString(array));
  11. }
  12. }
Success #stdin #stdout 0.11s 320512KB
stdin
Standard input is empty
stdout
[01, 02, 03]