exam questions

Exam 1z0-808 All Questions

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

Exam 1z0-808 topic 1 question 216 discussion

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

Given:

Which two code fragments can be inserted at line n1? (Choose two.)

  • A. String str = ג€Javaג€;
  • B. for(int iVal = 0; iVal <=5; iVal++){}
  • C. Test() {}
  • D. package p1;
  • E. import java.io.*;
Show Suggested Answer Hide Answer
Suggested Answer: AC 🗳️

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
ShaileshRaj
3 months, 1 week ago
Selected Answer: AC
other option can't be put inside class
upvoted 1 times
...
DriftKing
4 months, 3 weeks ago
Option A shows ---> String str = ג€Javaג€; Looks like this is a mistake as it should be ---> String str = "Java";
upvoted 3 times
...
dsms
4 months, 4 weeks ago
Selected Answer: AC
A) String str = "Java"; C) Test( ) { }
upvoted 1 times
...
akbiyik
1 year, 1 month ago
Selected Answer: AC
A) Test( ) { } B) String str = "Java"; C) package p1; D) import java.io.*; E) for (int ival = 0 ; ival <= 5; ival++) { }
upvoted 1 times
...
iSnover
1 year, 3 months ago
Selected Answer: AC
The correct answer is AC, I will explain: B -> You can't put a for loop outside the main method D -> This one is very wrong, you can only declare the package in the first line of code E -> This one is as wrong as the letter D, you can only import one package before instantiating the class and if you have a package declared, the declaration can only be made between it and the class declaration, anything outside of that is wrong
upvoted 2 times
...
shivkumarx
1 year, 4 months ago
Correct answer is A and C You can't declare a for loop outside main method
upvoted 2 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