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

  Write a class array that encapsulates an array

Write a class Array that encapsulates an array and provides bounds-checked access. The private instance variables should be int index and inarray[10]. The public members should be a default constructor and methods (signatures shown below) to provide ..

  Write function in javascript to compute person-s gross pay

Write the function using JavaScript syntax to compute a person's gross pay for a week. The function should receive the number of hours worked and the rate of pay per hour.

  Create a recursive factorial program

Assignment 1: Create a recursive factorial program that prompts the user for an integer  N  and writes out a series of equations representing the calculation of  N !. For example, if the input is 4, the output could be:

  Create bean jsp program which will compute simple interest

Create the bean which will compute Simple Interest. Use bean in JSP program. Accept details of saving like principal amount, rate of interest, period-in years from user and show amount

  Simulate a simple multiuser computer system

Prepare a java program to simulate a simple multiuser computer system

  Java class to accept a user-s hourly rate of pay

Write a class that accepts a user's hourly rate of pay and the number of hours worked. Display the user's gross pay, the withholding tax (15% of gross pay), and the net pay (gross pay - withholding).

  Write a program to register students for a college

Students have names, addresses and courses. Implement the interface class RegisterStudent. RegisterStudent has one method, public boolean register, which returns the boolean value of true or false if the student is successfully registered for the ..

  Compute the temperature in centigrade

Compute the temperature in Centigrade - Display the temperatures in both Centrigrade and Fahrenheit with appropriate labels, using the + operator to concatenate the labels with the variables

  Java script program for song

Construct a JavaScript program that declares and prints an array that includes at least twenty of your favorite songs.

  Methods

Assignment describe the basic working of methods. How to write a method in java and how to call a method.

  A jsp expression can contain any java expression

A JSP expression can contain any Java expression that evaluates to a

  Write a java program in a netbeans project

Write a Java program in a NetBeans project

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