Solved

max(int, int)

Posted on 2002-07-09
2
242 Views
Last Modified: 2012-05-11
in order to use

max(int, int) do I have to include/import a package?  If so, which one?  

When I compile after using this method, I get:

C:\My Documents\CS 342\03\AvlTree.java:71: cannot resolve symbol
symbol  : method max  (int,int)
location: class AvlTree
          t.height = max( height( t.left ), height(t.right) )+1;
 
0
Comment
Question by:msknr
  • 2
2 Comments
 
LVL 92

Accepted Solution

by:
objects earned 100 total points
ID: 7142056
It's a static method so you need to specify the class:

t.height = Math.max( height( t.left ), height(t.right) )+1;
0
 
LVL 92

Expert Comment

by:objects
ID: 7142169
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question