What Is The Output Of The Following Java Codep Pre Langjava #485

What is the output of the following Java code?</p> <pre><code class="language-java"> class HCF { void Prime() { int n1=10; int n2=6; int temp; while (n2 != 0) { temp = n2; n2 = n1% n2; n1 = temp; } System.out.println(n1); } public static void main(String args[]) { HCF obj=new HCF(); obj.Prime(); } }</code></pre>

Online Quiz This multiple choice question (MCQ) is related to the book/course gs gs111 OOP Object Oriented Programming Java. It can also be found in gs gs111 Class Components (Using Java) - Member Functions - Quiz No.1.


Similar question(s) are as followings:



Online Quizzes of gs111 OOP Object Oriented Programming Java

Choose an organization

Theme Customizer

Gaussian Texture



Gradient Background