Solved

max(int, int)

Posted on 2002-07-09
2
238 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Unable to open debugger port in Intellij idea 6 139
stackato and cloud 4 65
Basic Java Case or If-Else statement... 3 43
reverse digits of a number using for loop 5 36
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
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 third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

932 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now