jpr answers
jpr answers
else {
3. Write a java program to }
implement following functions }
of string :
(1)Calculate length of string
(2)compare between strings
3)class TestStringConcatenation1{
(3)Concatenating strings
public static void main(String args[]){
1)public class Test {
String s="Sachin"+" Tendulkar";
// main function
System.out.println(s);//Sachin Tendulkar
public static void main(String[] args)
}
{
}
String str = "GeeksforGeeks";
4. Write a program to find largest
System.out.println("The size of "
number in array
+ "the String is "
public class LargestElement_array {
+ str.length());
public static void main(String[] args) {
}
int [] arr = new int [] {25, 11, 7, 75,
} 56};
String s2 = "xyz"; }
In Java, visibility control refers to the ability to restrict the access to class
members (i.e., fields, methods, and inner classes) from other classes or code
outside the current class.For example, the Java Servlet API (javax.servlet)
getServletContext() returns an implementation of
javax.servlet.ServletContext, which is typically an immutable proxy to satisfy
the ServletContext framework promises. It is most possible that a separate
version of the javax.servlet.ServletContext specification operates on the
application server.