Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update java-quiz.md #2

Merged
merged 2 commits into from Apr 8, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions java/java-quiz.md
Expand Up @@ -130,7 +130,17 @@ class Three implements One, Two {
```

#### Q10. What is the output of this code?
String m = "Hello world!";
String n = m.substring(6,12) + m.substring(12,6);
System.out.println(n);


#### Q11. What is the output of this code?
How do you write a foreeach loop that will iterate over ArrayList<Pencil>pencilCase?
for(Pencil pencil = pencilCase){}

Iterator iterator = pencilCase.iterator();
for(){iterator.hasNext()}{}

#### Q12. Fill in the blanks?
Object-oriented programming (OOP) is a programming language model that organizes software design around (objects), rather than (functions).