1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Over [174]
1 year ago
15

try the following code to see a nullpointer error (if you don’t see the error because of the autograding, you can copy it into t

he pencil icon scratch area to run it without the grader). since s is null, indexof throws an nullpointer error for s. comment out the first if statement and run the program again. the second if statement avoids the error with shortcircuit evaluation. because s !
Computers and Technology
1 answer:
gavmur [86]1 year ago
4 0

Using the knowledge of computational language in JAVA it is possible to describe  since s is null, indexof throws an nullpointer error for s. comment out the first if statement and run the program again. the second if statement avoids the error with shortcircuit evaluation.

<h3>Writting the code:</h3>

<em>public class Printer {</em>

<em>    private String name;</em>

<em>    public void print() {</em>

<em>        </em><em>printString</em><em>(name);</em>

<em>    }</em>

<em>public class Example {</em>

<em />

<em>    public static void </em><em>main</em><em>(String[] args) {</em>

<em>        Object obj = null;</em>

<em>        obj.hashCode();</em>

<em>    }</em>

<em />

<em>}</em>

<em>    public static void </em><em>main</em><em>(String[] args) {</em>

<em>        Printer printer = new Printer();</em>

<em>        printer.print();</em>

<em>    }</em>

<em>}</em>

<em>    }</em>

<em>public class Example {</em>

<em />

<em>    public static </em><em>void </em><em>main(String[] args) {</em>

<em>        Object obj = null;</em>

<em>        obj.hashCode();</em>

<em>    }</em>

<em />

<em>}</em>

<em>    public static void </em><em>main</em><em>(String[] args) {</em>

<em>        Printer printer = new Printer("123");</em>

<em>        printer.print();</em>

<em>    }</em>

<em>}</em>

See more about python at brainly.com/question/19705654

#SPJ1

You might be interested in
How many people in the world
sveticcg [70]

Answer:

Around seven billion people

4 0
2 years ago
One property of light that makes it possible to record the image of an object with the camera
KengaRu [80]

Answer:

Reflection

Explanation:

Reflection is the property of light in which when a ray of light hits a smooth surface, it bounces back in the direction in which it came from. If i is the angle between the normal to the surface and the incident ray, and r is the angle between the normal and reflected ray, the law of reflection states that the angle of incidence equals the angle of reflection. That is, i = r.

So, to record the image of an object with a camera, one property of light that makes that possible is reflection because, the incidence rays form an image of the object in the camera, while the reflected rays reflect the image so that it is visible to the eye.

7 0
3 years ago
How to do a linear equations
Dimas [21]
Hey, there are many videos on the internet like youtube that you can watch. Juust type in your questions and there will be many videos that give a brief explanation :) hope it helped u
8 0
3 years ago
Which of the following is NOT essential for individuals to have to build their own web page?
natali 33 [55]
Linux. You do not need Linux as an operating system for your website.
5 0
3 years ago
If Twitter were to exclusively use e-mail, collaborative computing, and other computer connections to connect geographically sep
sweet-ann [11.9K]

Answer:

Virtual is the correct answer for the above question.

Explanation:

A Virtual organization is a collection which is used to connect the geographical people, organizational units, employees, individuals and groups for some communication purpose. Virtual means that there is some existence like physically but it is not physically present. So the organization also connects the person and gives the real scenario with the help of some software for communication.

The question states that if twitter uses email and other computing connections to connect people globally then it comes in the Virtual department because it follows the concept of the virtual department. Hence Virtual is the correct answer.

5 0
3 years ago
Other questions:
  • Which transformation(s) can be used to map ARST onto
    8·1 answer
  • Why should you log out when you finish an online session?
    9·1 answer
  • In codd's model of a relational database, data is stored in a(n) _____, which maintains information about a(
    7·1 answer
  • 33 points!!!!!!!!!!pls help
    15·1 answer
  • What is the difference between a sequential program and an event-driven program?
    9·1 answer
  • How do you put a picture when you ask a question?
    6·2 answers
  • Which of the following situations would not require knowledge of networking?
    11·2 answers
  • In photoshop what should you consider when determining a projects purpose and objectives?
    15·1 answer
  • PLEASE HELP ASAP!! Timed test!!
    12·1 answer
  • A video game controller contains the buttons: A, B, X, Y. When the player presses A their character Jumps. When the player press
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!