MCQs > IT & Programming > Java > What would happen on trying to compile and run the following code? private class Crack { } public class Manic { transient int numb; public static void main(String sparrow[]) { } }

Java MCQs

What would happen on trying to compile and run the following code?

private class Crack
{ }
public class Manic
{
    transient int numb;
    public static void main(String sparrow[])
    { }
}

Answer

Correct Answer: A Compilation error because class Crack cannot be private

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Java Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Java Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it