Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

max(int, int)

Posted on 2002-07-09
2
Medium Priority
?
249 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 400 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

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses

618 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