Solved

max(int, int)

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
This video teaches viewers about errors in exception handling.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

760 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

19 Experts available now in Live!

Get 1:1 Help Now