Finding java code error

Assignment Help JAVA Programming
Reference no: EM1379131

Using the following data definition class:
public class Circle {
private int radius;
public Circle(int r) {radius = r;}
public int getRadius() {return radius;}
public double area() {return 3.14 * radius * radius;}
}

Indicate in the given code segment if an error occurs. If so, indicate whether it is syntax, runtime or logic and how you would fix it.

public class Use2 {
public static void main (String [] args)
{
Circle round;
fill(round);
System.out.println ("Area: " +
round.area());
}

private static void fill(Circle shape)
{ shape = new Circle (6); }

}

Reference no: EM1379131

Questions Cloud

Design several security awareness posters : With the help of graphics program, design many security awareness posters on the following themes, updating antivirus signatures, watching out for e-mail viruses.
Maximum utilisation of the corporate intranet link : Determine the maximum utilisation of the corporate intranet link which can be permitted if the mean delay through the mux for voice calls is to be kept below 11.755 ms during the busy hour.
Creating er diagram : Construct a table for consumer. The manager tells me that this table needs to track the following data: all consumers' social security number, first and last name, address, city,
Java program editing : Prompt the user for the student's score and put that value into an object
Finding java code error : Indicate in the given code segment if an error occurs. If so, point to whether it is syntax, runtime or logic and how you would fix it.
Write the bubble sort : The village of Marengo conducted a census and collected records that have household data, including the number of occupants in each household.
Describe an example of an equity investment : Describe an example of an equity investment that can also produce income and describe a real or made up but realistic situation that could cause you or someone you know to have to use money from a financial reserve.
Design an application for pizza order process : Create an application to take and procedure a pizza order. The user should be able to make pizza order choices from listboxes, and the application should show the order price.
Multiple choice java programming questions : Determine which of the following may be a violation of information hiding if inserted for the comment above?

Reviews

Write a Review

JAVA Programming Questions & Answers

  Create web application uses visual web java server

Create the Web application which uses Visual Web Java Server Faces framework and either Apache Tomcat or Glassfish as the server.

  Print the contents of the array

Prepare a second loop that prints the contents of the array

  Design and implement an applet called circles

Design and implement an applet called Circles that draws 50 circles of random diameter in random locations. If the diameter of a circle is less than a certain value, the circle is ?lled with the color yellow.

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Please write the code in java

Please write the code in java for  Recursion,  Sorting and Searching

  Write program in java-calculate and display mortgage payment

Write the program in Java (with a graphical user interface) and have it calculate and display the mortgage payment amount from user input of the amount of the mortgage.

  Robot preparing for competition

Create an event so that the skateboard can be controlled by game player

  Java program which demonstrates cellular automata

Using the internet, locate a Java program (or Java applet) which demonstrates "Cellular Automata", in particular "the Game of Life".

  Solving programming problems

Write a computer program that will figure out the total of an order when given the amount of the order ($1000) and a sales tax rate of eight percent.

  Write an interface for an abstract method

Write an interface, PointingDevice, containing:  an abstract method, getXCoord that returns an int and an abstract method, getYCoord that returns an int.

  Develop java applet that will help elementary school student

Develop a Java applet that will help an elementary school student learn multiplication. Use the Math.random method or a Random object to produce two positive one-digit integers.

  The frantic pipe layer game

Design the Frantic Pipe Layer game

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd