aspose file tools*
The moose likes Beginning Java and the fly likes [solved]warning message: Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "[solved]warning message:" Accessing static method numbers" #7th floor" Watch "[solved]warning message:" Accessing static method numbers" #7th floor" New topic
Author

[solved]warning message:" Accessing static method numbers" #7th floor

L Willie
Ranch Hand

Joined: Aug 10, 2008
Posts: 51
[solved]no idea,may somebody give me some hints for the question?

Write a method to display a pattern as follows:

1
2 1
3 2 1
...
N n-1 3 2 1

The method header is
public static void displayPattern(int n) //Assumption: n <= 99

harilal ithikkat
Ranch Hand

Joined: Oct 06, 2008
Posts: 221



OUTPUT
1

2 1

3 2 1

4 3 2 1

5 4 3 2 1

6 5 4 3 2 1

7 6 5 4 3 2 1

8 7 6 5 4 3 2 1

9 8 7 6 5 4 3 2 1

10 9 8 7 6 5 4 3 2 1




SCJP 1.5
"A candle looses nothing by lighting another candle"
itechmentors.com
pete stein
Bartender

Joined: Feb 23, 2007
Posts: 1561
harilal ithikkat wrote:

impressive job of doing someone else's homework. good show.
L Willie
Ranch Hand

Joined: Aug 10, 2008
Posts: 51
pete stein wrote:
harilal ithikkat wrote:

impressive job of doing someone else's homework. good show.

thank a lot
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61413
    
  67

harilal ithikkat, please read this.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
L Willie
Ranch Hand

Joined: Aug 10, 2008
Posts: 51
Bear Bibeault wrote:harilal ithikkat, please read this.

is ok,i'll learn and understand from the answer,not only copy and submit homework.
L Willie
Ranch Hand

Joined: Aug 10, 2008
Posts: 51


after i modified bit from the answer given by harilal ithikkat .
it can compile and run properly.
However,compiler promt warning message "Accessing static method numbers" on myAnswer.numbers();[line22]
What the warning message state about?
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39393
    
  28
You're lucky Bear found this thread before I did. I would simply have deleted the solution.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39393
    
  28
Static methods should be preceded by the name of the class, not the name of the object. If they are in the same class, you simply write the name of the method.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: [solved]warning message:" Accessing static method numbers" #7th floor