array 10 « array « Java Collection Q&A

Home
Java Collection Q&A
1.algorithm
2.array
3.Array Byte
4.Array Char
5.Array Convert
6.Array Dimension
7.Array Integer
8.Array Object
9.Array String
10.ArrayList
11.collection
12.comparator
13.Development
14.Garbage Collection
15.Generic
16.hash
17.HashMap
18.HashTable
19.iterator
20.LinkedList
21.List
22.Map
23.queue
24.Set
25.Sort
26.tree
Java Collection Q&A » array » array 10 

1. java array gap type question, i'm really stuck    coderanch.com

hi there, so i have this array that is made of 31 classes (i don't even know if you can do that) and each class has 2 strings and 1 integer, but with each of the 31 classes one of each of those strings i want to have a gap in the middle. so here's an example of one class: private ...

2. Array place getting null itself    coderanch.com

Hello, i have 2D array and initialise it with nested loop. More specific in place array[11][2] initialise it as element of another class i created. Now if i use system.out to print this place after the end of loop, content is ok, but if i print it in a method i created is null!!! Im not doing anything in that place ...

3. How to get last ten years in one Array based on Current Year    coderanch.com

Hi All, I have a requirement like, i have to get last ten years in one Array based on current year. import java.util.Calendar; public class DecrementYear { public int[] lastTenYears() { Calendar cal = Calendar.getInstance(); int year = cal.get(cal.YEAR); return null; } public static void main(String args[]) { DecrementYear dy = new DecrementYear(); int arr[]=dy.lastTenYears(); } } I am calling lastTenYears() ...

4. Update an array    coderanch.com

Hello, I have an integer array size of ten. Im trying to create a method that each time, will store in array the ten recent calculations. For example if i do 40 calculations in array i want to each time storing the 10 most recent. How i can achieve this? thank you

5. array helps    coderanch.com

6. For that if use the array? Which is the its main function?    coderanch.com

Thanks, I read! See my code: public class arrayTest { //inicializao do programa public static void main(String args[]) { int[] anArray; //declares an array of intengers anArray = new int[10]; anArray[0] = 100; //initialize first element anArray[1] = 200; //initialize second element anArray[2] = 300; anArray[3] = 400; anArray[4] = 500; anArray[5] = 600; anArray[6] = 700; anArray[7] = 800; anArray[8] ...

7. null arrays    coderanch.com

8. Problem with Array.    coderanch.com

Hello all! Not can understand ARRAY with FOR. See: I use the FOR for show element of ARRAY in a single line. So, see code: Code: public class arrayTest { //inicializao do programa public static void main(String args[]) { int[] anArray; //declares an array of intengers anArray = new int[10]; anArray[0] = 100; //initialize first element anArray[1] = 200; //initialize second ...

10. array question    coderanch.com

Hi! import java.util.Random; public class matches { public static void main(String args[]){ String names[] = {"A","B","C","D","E","F","G","H","I","J"}; int numb; int numb2; Random randInt = new Random(); for (int i=0; i < 5; i++){ numb = randInt.nextInt(10); numb2 = randInt.nextInt(10); //Just in case same fighters. if (numb == numb2){ numb2 = randInt.nextInt(10); } System.out.println(names[numb] + " vs " + names[numb2]); } } } ...

11. Array.newInstance documentation    coderanch.com

12. Array out of bounds    coderanch.com

I am new at Java and I am not sure if I am posting at the right place. Please let me know if I am not. I am trying to transfer a 2 dimension array to a text file but get the following runtime error: java.lang.ArrayIndexOutOfBoundsException: 2 at Parts.writeArray(Parts.java:25) at Parts.main(Parts.java:13) Here is the code I have so far: import java.util.Scanner; ...

13. Array out of bounds    coderanch.com

14. array question?    coderanch.com

I have several questions as follows and will appreciate any one can help. 1. I need to read data from text file and strore them in an array. It is a name game from SSA. Here is the text file. I need to read them and then store in an array. The number is the ranking of the name in the ...

15. help with arrays    coderanch.com

Hi I have an array which stores info about 20 teams. I created another array which stores the exact info of the first array but the teams are shuffled. I also have a third array this time of 10 which is being used to store matches i.e. 10 matches between the 20 teams. Now for the matches, I have a class ...

16. 'Arrays of arrays' confusion    coderanch.com

I'm somewhat familiar with multidimensional arrays in BASIC varieties, but not quite understanding the arrays of arrays. In an array of arrays of integers it seems that everything up to but excluding the last index points to a reference variable. So in the case of int myArray [] [] [] [] = new int [5] [4] [3] [2] (pretend I filled ...

17. java arrays    coderanch.com

18. JAVA Shuffle array ?    coderanch.com

19. Array overwritten    coderanch.com

Hi all. I'm building a version of battleships, two arrays are created, x and y, when added to the array list Ships. When i run the program i get the same variables appearing in each instance of the array. Any ideas? import java.util.*; public class Ship { ArrayList Ships = new ArrayList(); int[] x = {0, 0, 0, 0}; int[] y ...

20. unable to understand the syntax in arrays    coderanch.com

You want a new byte array large enough to hold all the values from 0 to 0xffffffff inclusive. You are using this as a bitmap, where each value uses 1 bit. Instead of writing false-true-false-true-false-true-false-true, you can write 01010101 and be sure to squeeze those 8 boolean values into 8 bits (1 byte). So to fit all the values from 0 ...

21. Array    coderanch.com

22. help with arrays program in java    coderanch.com

Hi all. I have to write a java program that allows a user to enter an octal digit and output the binary equivalent for as many numbers as the person wishes using a direct access method. The error is that even though it compiles, it loops the binary equivalent. The code goes as follows: import java.util.Scanner; // initialize scanner class for ...

23. array with positions not defined    coderanch.com

24. How does this array work?    coderanch.com

I am having trouble understanding how this works? class TGFace { // Fields: Vector indices; // Constructors: public TGFace() { this.indices = new Vector(); } // Methods: // Add an index to a vertice list to the face. public void addIndice(int i) { this.indices.addElement(new Integer(i)); } } then later on in the program it adds this: types[0] = new TGObject(); types[0].addVertice(new ...

25. array problem    coderanch.com

Hi im at my wits end here trying to get this simple array problem sorted and would appreciate some help. I have 2 arrays, one for 'candidates' filled with names. and the other is 'votes' which is filled via scanner. Simple voting. the output is the name of the candidate with the total amount of votes they got. I have the ...

26. Arrays Help needed    coderanch.com

27. Adding arrays?    coderanch.com

I have 3 arrays that were filled from a file. The first column is breakfast, the second column is lunch, and the third column is dinner. But now I have to get the totals for each day (or row), and I don't know how to do that without having a multi dimensional array since I already have 3 arrays filled. The ...

28. Beginner help with arrays    coderanch.com

29. Array Methods    coderanch.com

30. getClass on array    coderanch.com

If i call getClass method on an array reference variable, for instance short[]x=new short[2] i get this class [S if its an int array i get class [I if its an object array, assume the class name is A, i get class [LA 1.What is this really?. Which class do arrays really belong. And i asked another question related to this ...

31. Declaring/Initializing Arrays on Separate Lines    coderanch.com

public class Tester { public static void main (String args[]) { int x[], y; x[] = new int[] {1, 5}; y = 5; } } This doesn't compile. The problem is fixed if I just declare and initialize x[] on the same line, but I'm curious as to why it doesn't compile. My book says it should. It also compiles if ...

32. User input into array    coderanch.com

Hello, Im working on the magic squares assignment and the tester asks the user to input values on a single line to be used for the magic square class. My problem is how do I take values given on one line and seperate them into an array or 2D array? This is an example user input: Enter a sequence of integers, ...

33. Array Problem    coderanch.com

I am writing this very simple program, but for some reason I get a "ArrayOutOfBoundsException" import java.io.*; class devshed { public static void main(String[] args)throws IOException { BufferedReader in = new BufferedReader (new InputStreamReader(System.in)); System.out.println("Type \"help\" to get Started" + "\n"); String state = "Enter"; while (state != "Exit") { System.out.print("> "); String userInput = in.readLine(); String[] command = userInput.split(" "); ...

34. Array expert's help needed    coderanch.com

package com.rxBatch; import java.io.File; public class Test { public static void main(String[] args) { String[] filesFromDest = new String[500]; String[] source = {"C://filesys/fileSys1"}; File f1 = new File(source[0]); fetchFilesFromDirectory(f1, filesFromDest); for (int i = 0; i < filesFromDest.length; i++) { System.out.println(); } } public static void fetchFilesFromDirectory(File f, String[] listOfFiles) { File[] fileSys2 = f.listFiles(); for (int i = 0; i ...

35. Test user input against an array    coderanch.com

not sure if I am going about it the right way but this is what I am trying to do and what I have so far. I want the program to randomly pick something from the terminology array and ask a question for the user to answer. So far I can get it to do that and have the user input ...

36. java.util.array not recognised    coderanch.com

import java.util.*; import java.lang.*; import org.annolab.tt4j.*; import static org.annolab.tt4j.Util.join; public class tagging { public static void main(String[] args) { System.setProperty("treetagger.home", "c://treetagger"); TreeTaggerWrapper tt = new TreeTaggerWrapper(); try { tt.setModel("/c:/treetagger/models/english.par:iso8859-1"); tt.setHandler(new TokenHandler() { public void token(String token, String pos, String lemma) { System.out.println(token+"\t"+pos+"\t"+lemma); } }); tt.process(asList(new String[] {"This", "is", "a", "test", "."})); } finally { tt.destroy(); } } } sir above is ...

37. how to get things that I want from an array?    coderanch.com

int numOfPeople = (fields.length - 6) / 4; for (int i = 1; i == numOfPeople ;i++){ String name = fields[6 + 0] ; int height = Integer.parseInt(fields[6 + 1]); double weight = Double.parseDouble(fields[6 + 2]); int age = Integer.parseInt(fields[6 + 3]); //test System.out.println( name + " " + height + " " + weight + " " + age ); ...

38. Invert Array    coderanch.com

Yes, there is. It is quite easy. Start by writing a method which swaps two elements in an array, like this/** * Swaps the i-th and j-th elements in an int array. * Has no effect if i and j are the same. *@param array An array whose two elements are to be swapped. *@param i the index of one of ...

39. How to handle rows/columns in arrays    coderanch.com

Hi, I'm trying to print a 2-d array of powers, but I'm having trouble getting my head around the idea of columns and rows. So if I'm correct, is my inner loop assigning values in the array for columns, and my outer for loop is for the rows? Or should I have a separate array for each row of the table? ...

40. Array going out of bounds?    coderanch.com

41. Please help me with my arrays...!    dbforums.com

I have an assignment due on Tuesday and I'm having a few problems with arrays. First I can't seem to get my array to display vertically, it just comes out like 12,34,67,etc. also I'm having difficulty getting the highest and lowest number from the array. My program is supposed to get temperatures from the user and calculate the average, sum, high ...

42. Arrays[Java]    go4expert.com

Code: import java.io.*; import java.util.*; class Comp2004{ static int[]results; public static void main(String[] args){ //write a method which returns the largest sum of any consecutive integers in the array int []num = {27,6,-50,21,3,14,16,-8,42,33,-21,9}; int []results = new int[100]; int val = LargestSum(num,results); System.out.println("The largest value is :"+ val); }//main public static int LargestSum(int[]num,int[]results){ int x = 2;//start for loop to run ...

43. Adding two tables using arrays in java    go4expert.com

hi all, my project is in pending because of the one major task ..i connected two different databases and exported the values using separate excel sheet for each databse.Now i need to add both the tables from excel and output the value in third excelsheet. For ex , Table 1 service name failedcount totalcount partyadd 10 200 partysub 20 100 partydiv ...

44. Java Code Array ( Array to be viewed )    go4expert.com

Re: Java Code Array ( Array to be viewed ) here is my code....I need the users to see the output values in an Array the javac compile works ,....the java does run in dos....it is just I need the output to be an array Code: import java.text.*; //20 May 2008, Revision ...many import java.io.IOException; class mortgage //program class name { ...

45. Storing User Names in Array    go4expert.com

46. Array    go4expert.com

47. Help with arrays!    go4expert.com

Hi. In your code, you send two parameters to the num method, a[] and i. I am going to assume that i is the number that needs to be tested for. So... In your code, make sure you check every number in the array by using j as the index for the array. Also, you should not create a again inside ...

48. Display Array for user input    go4expert.com

I'm trying to create a calendar program in Java. I am hoping to display an array of input fields for the user with each field corresponding to a given date. I want to allow the user to input appointments as strings. Since it is expected that some dates will contain no appointments (i.e. the array entry contains a null object) and ...

49. randoms in array    go4expert.com

hi everyone .. i wanna store random numbers in an array then ask the user to guess it .. and compaire with the random array well am stuck at the array part . cant get it to work at all .. can anyone help pls .. just tell me how to store a randoms in array with for loop .. then ...

50. Adding Arrays to find min and max help please    go4expert.com

I am working on a project that takes the user input for 10 midTerm1, 10 midTerm2, 10 final exam grades, Then the program is suppose to add the 3 to find a min and max then display the min and max. I can't figure out how to get the 3 arrays into the final array and add them. Code: import java.util.Scanner; ...

51. need help with arrays    go4expert.com

the program below is suppose to give you a choice of adding, sum, and exit. the use can choose 1 to add another number until the array memory runs out (4 inputs will be used in this case). if and when the user chooses 2 then the numbers inputted by the user would be added and then printed out. 0 is ...

52. Array Sets?    go4expert.com

hello guyz, can anybody help me about this problem: "Create a java program, that will compute the union, intersection, and difference of a given sets... These given sets must be coming from a user. Example, they want 3 sets or 4 or 5 sets (it must be at least 2 sets) and these set will be named as set 1, set ...

54. Desperate help with arrays    go4expert.com

I need to write a java program that will read data from a file. The data is: John Doe 75 Joe Blow 65 Mary Smith 80 John Green 82 Jill White 97 The program is suppose to read into three separate arrays: firstname array, lastname array, and a score array. The output should be the initials followed by the score in ...

55. Java Array    go4expert.com

A date structure has a day/month format. A day ranges from 1 to 30 and a month is one of the months of the year. Specify an array of integers called day to hold the values of day, and an array of String called month to hold the possible values for a month e.g. January, February, etc. Assume all months have ...

56. array overruns issue    go4expert.com

57. array overruns issue    go4expert.com

58. Java arrays    go4expert.com

59. 1-D arrays in Java    go4expert.com

I am kinda teaching myself java and got stuck trying to create a a program to translate 10 words bi-directional from english to spaniah, using two different String Arrays one consist of english words and one consist of spanish words. Can someone help this novice out? import java.io.*;//tell Java we are using java.io libary. import java.util.*;//Java utility package also for Scanner ...

60. Java arrays    go4expert.com

class Test{ public static void main(String[] args){ int x=0; int [] num = {1,1,3,3,3,3}; int [] a = new int [4]; for(int i = 0; i < num.length-1; i++){ x =++num[i]; a[i++] = x; System.out.println("num :"+ i+" " + x); } for (int j = 0; j< a.length; j++){ System.out.println(a[j]); } }//end main }//end class

61. Finding the Mode in An Array    java-forums.org

Hi. My instructor gave us an assignment to calculate the modes in an array. Basically, the array values (not the index) contains the frequencies of the index number (like a histogram). For example, since the value of "10" (the highest number for values) occurs in index numbers 2, 4, and 11, the program must output that the "mode occurs at index ...

62. array    java-forums.org

63. Help with arrays!    java-forums.org

I am trying to write a code with parallel arrays. I'm not sure where I'm going wrong. Please help. THIS IS WHAT I'M TRYING TO DO: I am trying to create an application for a family who pays allowance to their children based on age, and if he/she has a job. The application will first ask for names and ages. Then ...

64. How to transfer 1D array in JAVA to 3D array in C    java-forums.org

Here is my problem: I am working on a project which is writen by JAVA. In JAVA, I have a 3D volume called velocity_java: float [][][] velocity = new float [NY][NX][NZ]. I need to use JAVA Interface to connect with my C program. In my C program, I define velocity as 3D array velocity_c float ***velocity; /*pointer*/ velocity = alloc3float(NY,NX,NZ). /*allocate ...

65. Please help me with arrays!    java-forums.org

I have an assignment due on tuesday and i'm having a few problems with arrays. First I can't seem to get my array to display vertically, it just comes out like 12,34,67,ect. also I'm having difficulty getting the highest and lowest number from the array. My program is supposed to get temperatures from the user and calculate the average, sum, high ...

66. Pls help me - how to draw out questions wrongly answered from a pool of array    java-forums.org

Hi, I'm desparately trying to know how to do the code whereby I can dispaly the wrong questions answered from category chosen. There are 4 categories with 5 questions each and I need to dispaly all the wrong questions. So far my code only show the question 1 all the time.:confused: Java Code: import javax.swing.*; public class Quiz {//Quiz Class public ...

67. Arrays    java-forums.org

68. Divide and Conquer@Array...im becoming crazy!    java-forums.org

Hello Guys, i have a little logic problem in my program. The program is easy, has no real use and is for my learning only. I try to implement a divideandconquer searchalgorithm inside an array. For this purpose i am using a method who uses two parameters, a stringarray and the searchedname. The problem: If the searchedString is not the median ...

69. Array problems!    java-forums.org

Is this an array or array list? Say its an array. String[] someArray = {"dog", "cat"}; in order to access objects knowing their index you can just say String animal = someArray[0]; Knowing this, you should be able to figure out how to do so knowing the value and not the index.

70. Arrays    java-forums.org

Hello, me again with yet another issue with Java syntax! I am about to give up with Java because I am really having an issue with grasping the syntax, but I'm not defeated yet! Basically this is what I need to do: Write a program that prompts a user for a list of 5 prices. The program is then to compute ...

71. My Simple Array Does Not Work!    java-forums.org

why oh why doesn't this array work.. :( i am able to write things into txt file but i cant seem to delete the null value for the array.. can someone please help.. the problem should display the whole content first, which is [1, , ,2] than it should display the content without the null which is [1,2] Java Code: class ...

72. array help    java-forums.org

I am trying to figure out ow to read integers from a user specified file in to an array. Since i don't ave any information about te file except for the fact that it is more or less a matrix, how do I get the program to read those numbers into a multidimensional array ?

73. array question    java-forums.org

This is what I ave so far, but it is spitting out random yes's and no's. import java.util.*; import java.io.*; import static java.lang.System.out; public class Squares { public static void main(String[]args) { int square; int matrix [][]= new int [64][64]; int counter=1; int n; Scanner filename = new Scanner(System.in); out.print("Enter file name: "); String inputfilename = filename.nextLine(); out.print("Enter output name: "); ...

74. Breaking up of array    java-forums.org

Hi, I have naerly 80,000 records in my database. When user clicks on search it fetches the corresponding data in an array from database. When it tries display the records on page it becomes really very slow. I just display 20 records per page. I want that when it gets data from database, it should get the first 20 records and ...

75. Need help on arrays and StringBuffer    java-forums.org

hello I have a problem with a question...If anyone knows help me please... Create 3 class 1.StringBuffer(SB) 2.One dimensional array with chars.. 3.Construstors def. expl. show your information which comes from array and send it StringBuffer sb like these...it was more than this but remembered basic. this is a one program as you know...I didnt do that if someone can ...

76. Adding two Arrays    java-forums.org

77. Arrays and methods    java-forums.org

Good Morning I can't wrap my head around methods and arrays in java. Please help with the following: [*]create a method called addCustomer(). the method must request the user to enter info for a customer and add the customer to the customer list.[*]First an array called customer list must be used throughout the class to store info about a Customer and ...

78. Arrays    java-forums.org

import java.io.*; public class Simulate { private static int noOfVehicles = 5; private static Vehicle vehicles[]; public static void main(String[] args) { /*int [] VehicleId = new int[5]; VehicleId[0] = 1; VehicleId[1] = 2; VehicleId[2] = 3; VehicleId[3] = 4; VehicleId[4] = 5; */ // Vehicle vehicles[] = new Vehicle(); Thread t1 = new vehicleId(VehicleId); Thread t2 = new vehicleId(VehicleId); Thread ...

79. Storing in an Array    java-forums.org

Hey guys, Hopefully here I can find some "simple" help for someone fairly new to java like me. Other forums people were helpful its just that I still find it hard to understand some of the concepts they are giving me. I'm working on a program with 9 classes, I've filled most of the object classes according to what I've been ...

80. Storing a record set into an array    java-forums.org

Hello Again, Yet another road block in my destination to completing my program. I wanted to create a MultiColumn Combobox and needed to store my Database values into an array so I get get them into the Combobox. I'm having trouble getting this code to work properly. It seems that the the combobox wont accept the variable items maybe because it ...

81. i can do count, but having problem with array    java-forums.org

actually i've tried that too. p.lenghth... i think it might be something simple but not getting at this point...i guess goto barns and nobels to see/read book lol public static void main(String[] args) { int even=0, odd=0; int p[]=new int[25]; for (int i=0;i

82. Java Array Assignments?    java-forums.org

83. Two simple array problems.    java-forums.org

Hi, I'm new to Java and was wondering if anyone could help me with these two array problems. 1: I have made this code that works to create multiplication tables with for loops: Java Code: public class MultiplyTables { public MultiplyTables() { } public void printTable(int x, int y) { int [][] grid = null; grid = new int [x+1][y+1]; for ...

84. Using Arrays Within Arrays    java-forums.org

Well, this is my first post on Java-Forums.org, so hello! :D I haven't been working with Java for a very long time, but have a good experience with JavaScript/ActionScript, HTML, and PHP. I am working on a console (text) RPG for my first real project, and I am using Scanner for input. It's been working out well, but I've been using ...

85. private array    java-forums.org

(ii) The Cca class represents a Cca offered by the school. It has the following attributes: a) ccaID (String) : an id that uniquely identifies a Cca b) name (String) : name of the Cca (e.g. Archery) c) numOfVacancy (int) : number of vacancies available in the Cca d) studentList : an array of Student currently involved in the Cca e) ...

86. Array trouble    java-forums.org

the outer loop will continue to loop until i is no longer less than rows and the inner will keep looping until j is no longer less than columns. In the loop, when you find an empty seat (the array holds the number 0), you are setting the seat occupied by setting it to 1, and then setting your i and ...

87. changing my program to array working program    java-forums.org

Java Code: import java.util.Random; public class Random100 { /*This is a program to generate random numbers between 1 and 999 with no repetitions in the sequence */ public static void main(String[] args) { Random rand = new Random(); for (int count = 0; count < 10; count++) //allocates the rows of 10 x 10 random numbers { System.out.println(); for (int i ...

88. convertion to array    java-forums.org

I have a program that i have to convert to using arrays instead of what i have to do the same thing and i'm not the strongest with array can any one help? ... i had hoped to just attach this but it is too big so unfortunutly i have to just post it import java.io.*; import java.util.*; import java.text.*; public ...

89. Array Help    java-forums.org

I'm writing a method to take an integer from the user and swap each pair of digits starting from the least significant. E.g., if the method is called with 232563 it would return 325236, or 1804982 returns 1089428. In the second case, the most significant digit, the "1", has no digit to swap with so remains in the same position. So ...

90. Help with arrays    java-forums.org

Hello, I'm a bit confused on how to do this. I'm supposed to open a dictionary file and store all of its values into an array. My guide tells me that I need to: "read in the name of the dictionary file from command-line-arguments, then read in a dictionary of words from the data file, store each word in an array....." ...

91. Arrays    java-forums.org

I am working on a program that asks the user to input students names, their address, education level, GPA, etc. But I need to use an array so the names of the students are stored so they can be printed when the user exits the program. My code only prints the name of the last student entered. I tried using an ...

92. method overloading and arrays.    java-forums.org

hi guys. i need help understanding how to use these together. i have to write a program that finds the average of a set of numbers (from an array), but use 2 methods, one returning an int, and the other a double. i have just about everything, i just don't know how to call and display the 2 values..?

93. Updating Arrays    java-forums.org

I have a program for a real estate company that displays a menu from which the user selects and can search unsold listings, change prices, etc... Everything is working except for making a sale, and updating selling price I assume problems are related. Java Code: public class PropertyListing { int listingNumber; char listingType; String location; String description; float askingPrice; float sellingPrice; ...

94. pretty simple array question    java-forums.org

you can use a 2 dimensional array and use two for loops to set the values. int[] massiveArray = new int[] {1,2,3,4,5,6,7,8,9 ... 328,329,330}; int[][] smallerArray = new int[30][10]; for (int i=0; i<30; i++) { for (int j=0; j<10) { smallerArray[i][j] = massiveArray[i*10+j]; } } Something like that will work I think.

95. Returning An Array    java-forums.org

96. Array    java-forums.org

Good point -- I used arraylist in my example because I did not want to confuse the point with keeping track of an index, max size, etc... I do however recommend using ArrayList since it is a dynamic array. Since this is an app that takes user input, it is likely that the number of inputs is unknown or variable. If ...

97. Working With Frequency Arrays...    java-forums.org

public static void getMostCommonNumbers() { int count = 6; int [] high = new int[count]; for (int i = 0; i < count; ++i) { high[i] = -1; } for (int i = 0; i < numFreq.length; ++i) { for (int j = 0; j < count; ++j) { if (high[j] != -1 && numFreq[i] > numFreq[high[j]]) { for (int k ...

98. Why doesn't this work? (multi-type array)    java-forums.org

99. Properties to array    java-forums.org

Hi everyone, For the purposes of my program i need to make an array out of properties object. Can you please point me in the right direction here? This is what i put together but it does not work String[] schemas = null; for (int i =0; i < databaseConnectionStrings.keySet().toArray().lengt h; i++) { schemas[i] = databaseConnectionStrings.keySet().toArray()[i].toString(); } Basically i need to ...

100. need some help with an array    java-forums.org

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.