Advertisement
jbjares

Untitled

Aug 15th, 2015
802
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. @Test
  2. public void test() {
  3. String[] sortedArray = {"a","b","c","d","e","1"};
  4. String[] unsortedArray = {"a","2","c","3","1","4"};
  5.  
  6.  
  7. int number = 0;
  8. for(int i=0;i<sortedArray.length;i++){
  9. if(!NumberUtils.isNumber(sortedArray[i])){
  10. continue;
  11. }
  12. number = Integer.parseInt(sortedArray[i]);
  13. }
  14.  
  15. for(int i=0;i<unsortedArray.length;i++){
  16. if(NumberUtils.isNumber(sortedArray[i])&&
  17. number==Integer.parseInt(sortedArray[i])){
  18. System.out.println(number);
  19. }
  20. }
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement