A. Double c = (Double) i; // Inconvertible types; cannot cast 'java.lang.Integer' to 'java.lang.Double
B. Double b = Double.valueOf(i); //Ok
C. Double a = i; // Required type: Double - Provided: Integer
D. double e = Double.parseDouble(i); // Required type: String - Provided: Integer
E. double d= i; //Ok
In a Java interface, only abstract methods and constants are allowed. Therefore, the two valid statements that can be written in the ExampleInterface are A. public String methodD(); and E. public abstract void methodB();. Both of these statements declare abstract methods, which is allowed in an interface.
upvoted 1 times
...
...
Log in to ExamTopics
Sign in:
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.
ASPushkin
6 months agoASPushkin
1 month, 3 weeks agobardemk
9 months, 3 weeks agod7bb0b2
1 year, 1 month agotmuralimanohar
1 year, 6 months agoStavok
1 year, 7 months agoStavok
1 year, 5 months ago