Solved problems are a specially designed set of problems which are usually based on some concept learning code sheets and they do enrich your learning of concepts along. They also provide you confidence to solve real life problems. Solutions to these problems are visible on user's request with press of a button.
Write the output for the following:
String s=”Today is Test” ;
System.out.println(s.indexOf(‘T’));
System.out.println(s.substring(0,7) + ” ” +”Holiday”);
Write the output for the following:
String s="Today is Test" ;
System.out.println(s.inde ...
Write a program to assign a full path and file name as given below. Using library functions, extract and output the file path, file name and
file extension separately as shown.
Input C:\Users\admin\Pictures\flower.jpg
Output Path: C:\Users\admin\Pictures\
File name: flower
Extension: jpg
Write a program to assign a full path and file name as given below. Using library function ...
Exam Questions are individual questions picked from a real past exam paper that may have appeared in some board/other examinations. Here question and solution will be shown
State the output of the following program segment is executed :
String a = "Smartphone", b = "Graphic Art";
String h = a.substring(2, 5);
String k = b.substring(8).toUpperCase();
System.out.println(h);
System.out.println(k.equalsIgnoreCase(h));
State the output of the following program segment is executed :
(i) Name the mathematical function which is used to find sine of an angle given in radians
(ii) Name a string function which removes the blank spaces provided in the prefix and suffix of a string
(i) Name the mathematical function which is used to find sine of an angle given in radians ...
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));
Consider the following String array and give the output
String arr[]= {"DELHI", "CHENNAI" ...
Write a program in Java to accept a string in lower case and change the first letter of every word to upper case. Display the new string.
Sample input: we are in cyber world
Sample output: We Are In Cyber World
Write a program in Java to accept a string in lower case and change the first letter of ev ...
Write the output for the following:
String s=”Today is Test” ;
System.out.println(s.indexOf(‘T’));
System.out.println(s.substring(0,7) + ” ” +”Holiday”);
Write the output for the following:
String s="Today is Test" ;
System.out.println(s.inde ...
Write a program to assign a full path and file name as given below. Using library functions, extract and output the file path, file name and
file extension separately as shown.
Input C:\Users\admin\Pictures\flower.jpg
Output Path: C:\Users\admin\Pictures\
File name: flower
Extension: jpg
Write a program to assign a full path and file name as given below. Using library function ...