All Matches
Solution Library
Expert Answer
Textbooks
Search Textbook questions, tutors and Books
Oops, something went wrong!
Change your search query and then try again
Toggle navigation
FREE Trial
S
Books
FREE
Tutors
Study Help
Expert Questions
Accounting
General Management
Mathematics
Finance
Organizational Behaviour
Law
Physics
Operating System
Management Leadership
Sociology
Programming
Marketing
Database
Computer Network
Economics
Textbooks Solutions
Accounting
Managerial Accounting
Management Leadership
Cost Accounting
Statistics
Business Law
Corporate Finance
Finance
Economics
Auditing
Hire a Tutor
AI Tutor
New
Search
Search
Sign In
Register
study help
computer science
oracle
Questions and Answers of
Oracle
Which of the following are marker annotations? (Choose three.)A. @TargetB. @InheritedC. @OverrideD. @RetentionE. @RepeatableF. @Documented.
Given the following declarations, which annotations can fill in the blank that would allow the code to compile? (Choose
An annotation cannot be applied to which of the following?A. Class declaration.B. Annotation declaration.C. Inner class declaration.D. Cast operation.E. Local variable declaration using
Assume the following code compiles. Which annotation inserted in the line allows the code to print a non-null value at
Which statements about the @Override annotation are correct? (Choose three.)A. It can be optionally specified when a class implements an abstract interface method.B. Adding it to a method may
How many lines of the following declaration contain a compiler error? A. NoneB. OneC. TwoD. ThreeE. FourF. Five. 1: public @interface Student { 2: 3: 4: 5: 6: 7: } final boolean likesPonies =
Which of the following are permitted to be used for annotation element type? (Choose three.)A. ObjectB. An annotationC. Class[]D. An enumE. DoubleF. var.
Fill in the blanks with the lines of code that allow the program to compile. (Choose two.) A. Presents on line t1B. @Presents on line t1C. Gift value() on line t2D. Presents.class on line
Which statements about annotations are correct? (Choose three.)A. Annotations contain data that changes throughout the program execution.B. Adding an annotation to a class that already compiles may
Which annotation can be applied to an existing annotation X and ensures a class that uses X shows the annotation in its generated
Which method declarations can @SafeVarargs be correctly applied to? (Choose two.) A. protected void hum(double... tune)B. final int whistle(int length, float... measure)C. static void
Given the following declarations, which annotations can fill in the blank that would allow the code to compile? (Choose
Which of the following are considered locales? (Choose three.)A. Cultural regionB. Local addressC. CityD. Time zone regionE. Political regionF. Geographical region.
Assuming the key green is in all five of the files referenced in the options, which file will the following code use for the resource
When localizing an application, which type of data varies in presentation depending on locale?A. CurrenciesB. DatesC. BothD. Neither
How do you find out the locale of the running program?A. Locale.get("default")B. Locale.get(Locale.DEFAULT)C. Locale.of()D. Locale.now()E. Locale.getDefault()F. None of the above
What is the output if the solveMystery() method is applied to a Properties object loaded from mystery.properties? A. bag ? trickB. bag ? nullC. bag null nullD. bag null trickE. The code does
How long will the effects of calling Locale.setDefault() be active assuming no other calls to that method are made?A. Until the end of the method.B. Until the program exits.C. Until the next
Given the following four properties files, what does this code print? A. null null nullB. engine 241 USC. moteur 45 USD. engine 241 earthE. moteur 241 earthF. An exception is thrown at
Fill in the blank so the code correctly compiles and creates a Locale reference.Locale loc =
Assuming the key turquoise is in all five of the files referenced in the options, which file will the following code use for the resource
How many lines does the following print out? A. Only an exception is printed.B. One, followed by an exception.C. Two, followed by an exception.D. Three.E. It does not compile. 3:
Assuming the key red is in all five of the files referenced in the options, which file will the following code use for the resource
What is the output if the launch() method is applied to a Properties object loaded from scifi.properties? A. saturn5 null ?B. saturn5 null nullC. null null ?D. saturn5 ? ?E. The code does not
For what values of pattern will the following print ? (Choose two.)A. ##,00.##B. ##,00.#C. 0,00.#D. #,00.#E. 0,00.0F. #,##.# String pattern _"; var message = DoubleStream.of (2.1, 6.923,
What is the result of the following? A. hammer nailB. The code does not compile due to line p1.C. The code does not compile due to line p2.D. The code does not compile due to line p3.E. An
Which of the following are not valid Locale formats? (Choose two.)A. nl_BEB. fr_CAC. uk_uaD. CRE. noF. ro_RO
Given the following two properties files, what does the following class output? A. Docker containerB. generic containerC. generic nullD. The output cannot be determined without knowing the
Assuming the Forest.properties file is the only resource file available, what is the output of calling the hike() method? A. treesB. trees prettyC. trees {0}D. trees nullE. The code does not
What is the most likely outcome of this code if the bunnies table is empty? A. One row is in the table.B. Two rows are in the table.C. The code does not compile.D. The code throws a
Fill in the blank with the option that allows the code snippet to compile and print a message without throwing an exception at
Which of the following are valid locale formats? (Choose two.) A. hiB. hi_INC. IN_hiD. in_hiE. HI_INF. IN
Assuming the key indigo is in all five of the files referenced in the options, which file will the following code use for the resource
For currency, the US uses the $ symbol, the UK uses the £ symbol, and Germany uses the € symbol. Given this information, what is the expected output of the following code
Assuming the key purple is in all five of the files referenced in the options, which file will the following code use for the resource
For currency, the US uses the $ symbol, the UK uses the £ symbol, and Germany uses the € symbol. Given this information, what is the expected output of the following code snippet?A. $6.95B. 6,95
Which statement best describes this class? A. It can be serialized.B. It is well encapsulated.C. It is immutable.D. It is both well encapsulated and immutable.E. None of the above as the code
Fill in the blanks: The ___________ class variable defines a whitelist of fields that should be serialized, while the ___________ modifier is used to construct a blacklist of fields that should not
Which statement best describes the following method? A. It is not susceptible to any common attacks.B. It is at risk of SQL injection attack only.C. It is at risk of a denial of service attack
Fill in the blanks: ____________ means the state of an object cannot be changed, while _____________ means that it can.A. Encapsulation, factory method.B. Immutability, mutabilityC. Rigidity,
Which of the following best protect against denial of service attacks? (Choose three.)A. Close resources with catch blocks.B. Use PreparedStatement instead of Statement.C. Close resources with
You ask to borrow one of your friend’s recipe cards. Which statements about these cards, represented as Java policy file grants, are correct? (Choose two.) A. The policy syntax of the policy file
Which of the following best protect against inclusion attacks? (Choose two.)A. Encrypt user passwords.B. Use immutable objects.C. Limit the recursive depth of ZIP files.D. Apply a blacklist to
What changes, taken together, would make the Tree class immutable? (Choose three.) A. Make all constructors private.B. Change the access level of species to private.C. Change the access level of
Which techniques best prevent sensitive objects from being manipulated by an attacker who wants to create a malicious subclass? (Choose three.)A. Add final to the class declaration.B. Set protected
Which statement best describes the following method? A. It is not susceptible to any common attacks.B. It is at risk of SQL injection attack only.C. It is at risk of a denial of service attack
Which statements about executing the following program are correct? (Choose two.) A. Line p1 makes the code susceptible to tainted inputs from the user.B. Line p2 makes the code susceptible to
How do you change the value of an instance variable in an immutable class?A. Call the setter method.B. Remove the final modifier and set the instance variable directly.C. Create a new instance
Let’s say you want to serialize the following class, but only want the flour quantity saved. What changes, if any, are required to the following class for this to occur? A. No changes are
Which are true about closing resources to guard against a denial of service attack? (Choose two.) A. The NIO.2 Files.lines() method does not require closing a resource when it is used in a stream
Which type of attack requires more than one source to initiate?A. Billion laughs attackB. Million frowns attackC. Distributed denial of service attackD. SQL injectionE. Inclusion
What is this class an example of? A. TurquoiselistB. WhitelistC. OrangelistD. BlacklistE. Both blacklist and whitelistF. None of the above import java.util.*; public class Nightclub { private
Which statements about the clone() method are correct? (Choose two.)A. Calling clone() on a class that does not implement Cloneable results in a compiler error.B. Calling clone() on a class that
Which statements about securing confidential information are correct? (Choose three.)A. When writing to System.out, you should not include sensitive information.B. When reading sensitive data from
What are the best scenarios for customizing the serialization process? (Choose two.)A. To prevent SQL injection.B. To shuffle data among users.C. It is the only way to prevent a sensitive field
Select a good strategy for handling input validation failures?A. Use the assert statement.B. Throw an Error.C. Log an error but allow the user to continue.D. Throw an Exception.E. Shut down the
Which statements about executing the following program are correct? (Choose two.) A. Line m1 makes the code susceptible to tainted inputs from the user.B. Line m2 makes the code susceptible to
Which can fill in the blank to make this code compile? A. GetObjectB. ReadFieldC. FetchItemD. ReadItemE. GetFieldF. None of the above. import java.io.*; public class Pony implements
Which statement about the following classes is correct? A. Only Flower is immutable.B. Only Plant is immutable.C. Both classes are immutable.D. Neither class is immutable.E. None of the above
Which of the following can cause an injection attack? (Choose two.)A. Access controlB. Command line inputC. Constants in the programD. Mutable codeE. SerializationF. XML parsing.
Assuming this class is passed a valid non-negative integer, which statements best describe the following class? (Choose two.) A. It is well encapsulated.B. It is susceptible to a denial of service
In which scenario is it appropriate for confidential information to be used? A. Writing to a log fileB. Printing a stack traceC. Outputting to System.errD. Storing in a StringE. Writing an
What statements about the following method are correct? (Choose three.) A. It protects against a denial of service attack.B. It does not protect against denial of service attacks.C. It protects
Which statement best describes this class? A. It can be serialized.B. It is well encapsulated.C. It is immutable.D. It is both well encapsulated and immutable.E. None of the above as the code
Which are true about this class? (Choose three.) A. It is able to be serialized.B. It is not able to be serialized.C. It is well encapsulated.D. It is not well encapsulated.E. It is
You’ve been hired by Charlie Sweets to perform a security audit of their login system. After reviewing the following code, what recommendations would best improve the security of their system?
Fill in the blanks with the proper method names to serialize an object. (Choose two.) A. readResolve in the first blankB. writeReplace in the first blankC. writeObject in the first
Your co-worker has called you in the middle of the night to report all the servers have been compromised and have run out of memory. After some debugging, it seems like the attacker exploited a file
Which statements about the following class are correct? (Choose three.) A. Line h1 properly validates security.B. Line h1 presents an unacceptable security risk.C. Line h2 elevates security
For which value of name will this code result in a successful SQL injection attack? A. DELETE TABLE records;B. 'Olivia'; DELETE TABLE recordsC. 'Sophia; DELETE TABLE recordsD. 'Elysia'; DELETE
Which are requirements for a class to be immutable? (Choose three.)A. A private constructor is provided.B. Any instance variables are private.C. Any instance variables are initialized in a
Which of the following are not typically considered denial of service attacks? (Choose two.)A. Downloading confidential information from a log fileB. Uploading a very large fileC. Performing SQL
The following code prints false. Which statements best describe the Fruit class? (Choose three.) A. It does not implement Cloneable.B. It performs a deep copy.C. It performs a shallow copy.D. It
What are the best ways to prevent SQL injection? (Choose two.)A. Avoid SQL statements that take query parameters.B. Log an error anytime a SQL injection attack is successful.C. Avoid concatenating
What is the result of the following? A. 2B. 18C. 19D. 110E. The code does not compile. } import static java.util.stream.Collectors. *; import } class Ballot { private String name; private int
Which of the following can fill in the blank to have the code print 44? A. Only mapB. Only mapToIntC. Only mapToObject.D. Both map and mapToIntE. Both map and mapToObjectF. map, mapToInt, and
What does the following do? (Choose two.) A. If any compiler errors are fixed, it prints true.B. If any compiler errors are fixed, it prints false.C. It compiles without issue.D. It doesn’t
Which statements about the following code are correct? A. It consistently prints 6.B. It consistently prints 7.C. It consistently prints another value.D. It does not consistently print the same
What is the result of the following? A. Both statements print 0.B. Both statements print 0.0.C. The statements print different values.D. The code does not compile.E. The code compiles but
Which lambdas can replace the method references in this code? (Choose two.) A. x.length()B. x -> x.length()C. x -> x::lengthD. System.out.println(s)E. s -> System.out.println(s)F. s
What collector can turn the stream at left to the Map at right? A. Only grouping()B. Only groupingBy()C. Only partitioning()D. Only partitioningBy()E. Both grouping() and partitioning()F. Both
Which expression is compatible with the IntSupplier functional interface? A. () -> 1 {return 1/0;}C. () -> return 4D. System.out::printE. None of the above
What is the output of the following application? A. SavedB. Too farC. The code does not compile because of the main() method.D. The code does not compile because of the saveLife()
Given a LinkedList, which method would you call to obtain a parallel stream that uses it as a data
How many lines does the following code output? A. One.B. Two.C. The code does not compile due to line x.D. The code does not compile due to line y.E. The code compiles but throws an exception
Which are true statements? (Choose two.)A. A source cannot return an infinite stream.B. A source may return an infinite stream.C. A source must return an infinite stream.D. An intermediate
0How many of these lines have compiler errors? A. One.B. Two.C. Three.D. Four.E. Five.F. The code compiles as is. 14: Consumer c1 = ArrayList:: new; 15: Consumer c2 = String: :new; 16:
What is true of this code? (Choose two.) A. It outputs {true=[true]}.B. It outputs {false=null, true=[true]}.C. It outputs {false=[], true=[true]}.D. It outputs {false=[null],
Which functional interface, when filled into the blank, prevents the class from compiling? A. DoubleUnaryOperatorB. FunctionC. IntToLongFunctionD. UnaryOperatorE. All of the above allow the
Which statements about applying forEachOrdered() to a parallel ordered stream instead of using forEach() are correct? (Choose two.).A. The operation will likely be faster.B. The operation will
What is the true of the following? (Choose two.) A. The output is 60-0-40B. The output is 60-2-40C. The code does not compile for one reason.D. The code does not compile for two
What is a difference between lambdas and method references?A. Only one can take a method parameter.B. Only one can reference an effectively final local variable.C. Only one can make a method call
Following the generate() method, which of the four method calls in this code can be removed and have the method still compile and run without error? A. filter()B. sorted()C. filter() and
What is true of the following? (Choose three.) A. If filling in the blank with method x, the code outputs Caught it.B. If filling in the blank with method x, the code prints a stack trace.C. If
Which statement is not true of Predicate?A. A boolean is returned from the method it declares.B. It is an interface.C. The method it declares accepts two parameters.D. The method it declares is
Which functional interface does not have the correct number of generic arguments?(Choose two.)A. BiFunctionB. BinaryOperatorC. DoubleFunctionD. ToDoubleFunctionE. ToIntBiFunction
How many changes need to be made to the following stream operation to execute a parallel reduction? A. None, it is already a parallel reduction.B. One.C. Two.D. Three.E. The code does not
What is the output of this code? A. bloatB. BLOATC. oneD. ONEE. The code does not compile due to line x.F. None of the above. Stream.of("one", "two", "bloat") .limit (1) .map (String:
Which lambda expression can be passed to the magic() method? A. (a) -> aB. (b,w) -> (long)w.intValue()C. (c,m) -> {long c=4; return c+m;}D. (Integer d, Integer r) ->
Fill in the blank: ______________ is the only functional interface that does not involve double, int, or long.A. BooleanSupplierB. CharPredicateC. FloatUnaryOperatorD. ShortConsumerE. None of
Showing 200 - 300
of 1045
1
2
3
4
5
6
7
8
9
10
11