Java Programming Interview Questions

Part 7

31 : What is default value of local variable.
Answer : There is non whatsoever default value of local variable. You must accept to initialize it. View more details on local variables inward java.

32 : Java back upwardly constructor inheritance?
Answer : No, Constructor inheritance is non supported inward java. View more details on constructor inward java.

33 : Which is super aeroplane of all other classes inward java?
Answer : java.lang.Object is  super aeroplane of all other classes inward java.

34 : What is Encapsulation?
Answer : Encapsulation is procedure of packing code in addition to information together In to a unmarried Unit. View more details on Encapsulation in java.

35 : Write a computer programme to contrary a string without using contrary function.
Answer : Program to contrary a string without using contrary business office inward coffee is every bit bellow.

package JAVAExamples;  populace aeroplane StringReverse {  populace static void main(String[] args) {     //String to reverse.   String str = "This Is String.";   String revstring = "";    for (int i = str.length() - 1; i >= 0; --i) {    //Start getting characters from terminate of the string.    revstring += str.charAt(i);   }    System.out.println(revstring);  } }

Output : .gnirtS sI sihT

More interesting articles here :Generation Enggelmundus Internet Marketing Tool here :Zeageat IM http://www.software-testing-tutorials-automation.com/
Post a Comment (0)
Previous Post Next Post