Solved

max(int, int)

Posted on 2002-07-09
2
243 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

Suggested Solutions

Title # Comments Views Activity
check java version using powershell 13 437
How to determine if a string is a valid SHA value 7 53
ejb entity bean example issue 2 39
IBM TS2900 (3572) Tape Autoloader Java? 12 99
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
This video teaches viewers about errors in exception handling.
Suggested Courses

736 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