Question
class increment {
public static void main(String args[])
{
int g = 3;
System.out.print(++g * 8);
}
}
a.
25
b.
24
c.
32
d.
33
Posted under Java Programming
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. What is the output of this program?
Similar Questions
Discover Related MCQs
Q. How to format date from one form to another?
View solution
Q. How to convert Date object to String?
View solution
Q. How to convert a String to a Date object?
View solution
Q. Is SimpleDateFormat thread safe?
View solution
Q. How to identify if a timezone is eligible for DayLight Saving?
View solution
Q. What is the replacement of joda time library in java 8?
View solution
Q. How is Date stored in database?
View solution
Q. What does LocalTime represent?
View solution
Q. How to get difference between two dates?
View solution
Q. How to get UTC time?
View solution
Q. Which of these is an incorrect string literal?
View solution
Q. Which two cause a compiler error?
1. float[ ] f = new float(3);
2. float f2[ ] = new float[ ];
3. float[ ]f1 = new float[3];
4. float f3[ ] = new float[3];
5. float f5[ ] = {1.0f, 2.0f, 2.0f};
View solution
Q. Given a method in a protected class, what access modifier do you use to restrict access to that method to only the other members of the same class?
View solution
Q. Which is a valid declaration within an interface?
View solution
Q. You want subclasses in any package to have access to members of a superclass. Which is the most restrictive access that accomplishes this objective?
View solution
Q. Which three form part of correct array declarations?
1. public int a [ ]
2. static int [ ] a
3. public [ ] int a
4. private int a [3]
5. private int [3] a [ ]
6. public final int [ ] a
View solution
Q. public class Test { }
What is the prototype of the default constructor?
View solution
Q. What is the most restrictive access modifier that will allow members of one class to have access to members of another class in the same package?
View solution
Q. Which of the following is/are legal method declarations?
1. protected abstract void m1();
2. static final void m1(){}
3. synchronized public final void m1() {}
4. private native void m1();
View solution
Q. Which cause a compiler error?
View solution
Suggested Topics
Are you eager to expand your knowledge beyond Java Programming? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!