This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes if statements in java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Reply locked New topic
Author

if statements in java

Joanna Spence
Greenhorn

Joined: May 31, 2010
Posts: 23
I am traversing an adjacency matrix

if I am in a for loop and want to check if
an adj matrix adjmatrix[x][y] has an entry at index x and index y in a if statement; how would i do that?

right now i have

[code]
if(adj[x][y] && value[x]< -priority)
{
}

but java doesn't like it

So, how would I say, in an "if" statement

if the adjacency matrix has an entry at [x][y]
how would i write that in java?

Thanks.

Tom Reilly
Rancher

Joined: Jun 01, 2010
Posts: 618
This is a double post. See Priority First Search and Adjacency Matrix
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: if statements in java
 
Similar Threads
banded matracies
June Newsletter Puzzle
Manipulating Vectors (code not working)
Two Way HashMap?
Texturing a matrix