Results 1 to 2 of 2
Thread: static methods
- 04-16-2012, 11:01 PM #1
Member
- Join Date
- Apr 2012
- Posts
- 15
- Rep Power
- 0
static methods
Im trying to create a static method that will implement the following;
1.boolean find(int x, int[] numbers): If x is an element of numbers, then return true, otherwise return false.
2.int[] indexOfElementsEqual(int x, int[] numbers): Returns an array containing the indices of the numbers array, which have the value x. For example, if the array is {2, 4, 2, 3, 4, 2}, and x=2, the array returned is {0, 2, 5}. If x is not present in numbers, then null is returned.
- 04-16-2012, 11:05 PM #2
Similar Threads
-
Trouble with static methods and boolean equals() methods with classes
By dreamingofgreen in forum New To JavaReplies: 8Last Post: 04-16-2012, 11:00 PM -
difference between static methods and instantce methods?
By venkatch in forum New To JavaReplies: 1Last Post: 10-23-2011, 12:37 PM -
Static and non static class methods question
By silverglade in forum New To JavaReplies: 2Last Post: 05-14-2011, 10:10 PM -
Recursion with static and non static methods
By sh4dyPT in forum New To JavaReplies: 14Last Post: 03-27-2009, 06:56 AM


LinkBack URL
About LinkBacks

Bookmarks