getMessage() methods return description of an exception
Which of the following is not an access modifier?
An abstract class defines only the structure of the class not its implementation
for Interface
Two or more methods with the same name can be differentiated on the basis of their parameters data type
How can we delete all files in a directory?
What is the default encoding for an OutputStreamWriter?
Which of the following methods is not used for Serialization and Deserialization?
public class program{
public static void main(String args[]){
String str1="234";
String str2="4534";
long l1=Long.parseLong(str1);
long l2=Long.parseLong(str2);
long sum=0;
sum=l1+l2;
String str3=Long.toString(sum);
if(str1.length()==str3.length()){
System.out.println(str3);}
else{
System.out.println(str1);
}
}//main end
}//class end