exam questions

Exam 1z0-808 All Questions

View all questions & answers for the 1z0-808 exam

Exam 1z0-808 topic 1 question 98 discussion

Actual exam question from Oracle's 1z0-808
Question #: 98
Topic #: 1
[All 1z0-808 Questions]

Which three statements are true about the structure of a Java class? (Choose three.)

  • A. A public class must have a main method.
  • B. A class can have only one private constructor.
  • C. A method can have the same name as a field.
  • D. A class can have overloaded static methods.
  • E. The methods are mandatory components of a class.
  • F. The fields need not be initialized before use.
Show Suggested Answer Hide Answer
Suggested Answer: CDF 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
iSnover
Highly Voted 2 years, 3 months ago
Selected Answer: CDF
Correct is CDF, A and E are wrong because you can create empty classes without problems. You can overload static methods (D) and The fields not necessarily need be ubutialized before use.
upvoted 6 times
Bramagon
1 year, 7 months ago
Don't agree with D. Static methods can't be overwritten, they can only be hidden. There are only 2 right answers here imo
upvoted 2 times
Harch
9 months, 3 weeks ago
It says overloaded, not overwritten. It's not the same.
upvoted 1 times
...
...
...
MPignaProTech
Most Recent 2 months ago
Selected Answer: CDF
CDF is good
upvoted 1 times
...
fvelazqueznava
1 year, 3 months ago
Selected Answer: CDF
CDF IS THE CORRECT
upvoted 1 times
...
DarGrin
1 year, 3 months ago
Selected Answer: CDF
CDF are correct
upvoted 1 times
...
Alok1105
1 year, 4 months ago
CDF is correct. Below is code. package exam_javase1; public class ClassBehavior { //can have overloaded static methods static int proof() { return 1; } static int proof(int a) { return a; } //can have method name same as variable name int sum; int sum() { //fields not necessarily needs to be initialed before use return sum+=1; } //can have multiple private constructor private ClassBehavior() { } private ClassBehavior(int a) { } void methodA() { System.out.println("Inside A"); } //No main method required }
upvoted 1 times
...
dsms
1 year, 5 months ago
Selected Answer: BCD
Answer is BCD: A. A public class must have a main method. - FALSE B. A class can have only one private constructor. - TRUE C. A method can have the same name as a field. - TRUE D. A class can have overloaded static methods. - TRUE E. The methods are mandatory components of a class. - FALSE F. The fields need not be initialized before use. - FALSE
upvoted 2 times
dsms
1 year, 4 months ago
Sorry, CDF is correct
upvoted 1 times
...
...
tuyetan
1 year, 7 months ago
CDF Question #96 is an example for D
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago