Computer Applications
Give the output of the following string functions:
"ACHIEVEMENT".replace('E', 'A')
Java
Java String Handling
ICSE 2018
32 Likes
Answer
ACHIAVAMANT
Working
All 'E' are replaced with 'A'.
Answered By
22 Likes
Related Questions
Give the output of the following statements:
String x[] = {"SAMSUNG", "NOKIA", "SONY", "MICROMAX", "BLACKBERRY"};
System.out.println(x[1]);
Give the output of the following string functions:
"DEDICATE".compareTo("DEVOTE")Consider the following String array and give the output
String arr[]= {"DELHI", "CHENNAI", "MUMBAI", "LUCKNOW", "JAIPUR"}; System.out.println(arr[0].length() > arr[3].length()); System.out.print(arr[4].substring(0,3));
Give the output of the following statements:
String x[] = {"SAMSUNG", "NOKIA", "SONY", "MICROMAX", "BLACKBERRY"};
System.out.println(x[3].length());