Question
Assume x=1 and y=2, what is the result of evaluating x + y = + x + y? 1. x + y = 3
Assume x=1 and y=2, what is the result of evaluating "x + y = " + x + y?
1. | x + y = 3 | |
2. | x + y = 12 | |
3. | Illegal operations | |
4. | None of the above |
What is the output? Choose three answers.
String numbers = "012345678";
System.out.println (numbers.substring(1, 3));
System.out.println (numbers.substring(7, 7));
System.out.println (numbers.substring(7));
A. | 12 | |
B. | 123 | |
C. | 7 | |
D. | 78 | |
E. | A blank line. | |
F. | An exception is thrown | |
G. | The code does not compile |
Which of the following statement is true?
1. | You can define a method inside a method. | |
2. | A local variable in a method always has a default value if you dont explicitly assign a value to it. | |
3. | A method can be declared with no parameters. | |
4. | None of the above is true. |
JAVA
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started