# Predict the output

Predict the output

#### What will be the output of the following code?

``````class Test
{
int a;
int b;
Test()
{
this(10, 20);
System.out.print("constructor one ");
}
Test(int a, int b)
{
this.a = a;
this.b = b;
System.out.print("constructor two ");
}
}
class new_test{
public static void main(String[] args)
{
Test object = new Test();
}
}
``````
```OptionsThis problem has only one correct answerconstructor oneconstructor twoconstructor two constructor oneconstructor one constructor twoAns:-  3Solution DescriptionWhen the object of Test class is created,the constructor with no arguments is called. When this(10,20) is encountered , the constructor with two arguments int and int is called because this is the reference of the object. So using this way we can call more than one constructor.Recommended Post :-HCL Coding Questions:-Count Even SumLength of HypotenuseCapgemini Coding Questions:-Move HashCharacter with their frequencyiMocha coding Questions:-Mathematical Calculation: Prime numberMathematical calculation : odd numbersTech Mahindra coding questions:-Find Even odd differenceFind Total curtainsFind odd even differenceFind total sumUnthinkable Solutions coding questions:-Swap the adjacent characters of the stringDouble the vowel characters in the stringCharacter with their frequencyProgram to find the closest valueMust check this:-PPS lab all the problems of 1st year C- program of CPU scheduling AlgorithmsCompanies interview:-Swap adjacent characters Double the vowel charactersCheck valid parenthesisPrint the characters with their frequenciesFind closest valueWord Count Program of CaesarCipherProgram to find the perfect cityAnnual Day | Tech Mahindra coding questionFind the number of pairs in the array whose sum is equal to a given target.Full C course:-    C -TutorialKey points:-How to set limit in the floating value in pythonWhat is boolean data typeHow to print any character without using format specifierHow to check that given number is power of 2 or notHow to fix limit in double and floating numbers after dot (.) in c++How to print a double or floating point number in scientific notation and fixed notationHow to take input a string in cHow to reduce the execution time of program in c++.Cracking the coding interview:- Array and string:-Is UniqueCheck PermutationUrlifyOne awayString CompressionZero matrixTree and graph:-Route between nodesMinimal TreeList of DepthValidate BSTSuccessorHackerearth Problems:-Very Cool numbers | Hacker earth solutionVowel Recognition | Hackerearth practice problem solutionBirthday party | Hacker earth solutionMost frequent | hacker earth problem solutionprogram to find symetric difference of two sets cost of balloons | Hacker earth problem solutionChacha o chacha | hacker earth problem solutionjadu and dna | hacker earth solutionBricks game | hacker earth problemAnti-Palindrome strings | hacker earth solutionconnected components in the graph | hacker earth data structureodd one out || hacker earth problem solutionMinimum addition | Hackerearth Practice problemThe magical mountain | Hackerearth Practice problemThe first overtake | Hackerearth Practice problemHackerrank Problems:- Playing With Characters | Hackerrank practice problem solutionSum and Difference of Two Numbers | hackerrank practice problem solutionFunctions in C | hackerrank practice problem solutionPointers in C | hackerrank practice problem solutionConditional Statements in C | Hackerrank practice problem solutionFor Loop in C | hackerrank practice problem solutionSum of Digits of a Five Digit Number | hackerrank practice problem solution1D Arrays in C | hackerrank practice problem solutionArray Reversal | hackerrank practice problem solutionPrinting Tokens | hackerrank practice problem solutionDigit Frequency | hackerrank practice problem solutionCalculate the Nth term | hackerrank practice problem solutionData structure:-  Program to find cycle in the graphImplementation of singly link listImplementation of queue by using link listAlgorithm of quick sortstack by using link listprogram to find preorder post order and inorder of the binary search treeMinimum weight of spanning treePreorder, inorder and post order traversal of the treeMust check this:-PPS lab all the problems of 1st year C- program of CPU scheduling Algorithms MCQs:-Engineering mathematics -4 MCQsCSS (Computer cyber security ) MCQS```