Tag Archives: annotation
Given: (Exhibit) Which annotation should be used to remove warnings from compilation?
Given:Which annotation should be used to remove warnings from compilation? A. @SuppressWarnings on the main and print methods B. @SuppressWarnings(“unchecked”) on main and @SafeVarargs on the print method C. @SuppressWarnings(“rawtypes”) on main and @SafeVarargs on the print method D. @SuppressWarnings(“all”) on the main and print methods Correct Answer: B
Which three annotation uses are valid? (Choose three.)
Which three annotation uses are valid? (Choose three.) A. var myString = (@NonNull String) str; B. Function<String, String> func = (@NonNull var x) > x.toUpperCase(); C. Function<String, String> func = (@NonNull x) > x.toUpperCase(); D. var v = “Hello” + (@Interned) “World” E. var obj = new @Interned MyObject(); F. Function<String, String> func = (var @NonNull x) >… Read More »
Given: (Exhibit) Which annotation should be used to remove warnings from compilation?
Given:Which annotation should be used to remove warnings from compilation? A. @SuppressWarnings on the main and print methods B. @SuppressWarnings(“unchecked”) on main and @SafeVarargs on the print method C. @SuppressWarnings(“rawtypes”) on main and @SafeVarargs on the print method D. @SuppressWarnings(“all”) on the main and print methods Correct Answer: B