I need to run a method 4 times and store the data gained somewhere so I can display it later.
is this statement correct? if not is there any way to do this?
public void myMethod()
{
//stuff in...
Type: Posts; User: mjballa
I need to run a method 4 times and store the data gained somewhere so I can display it later.
is this statement correct? if not is there any way to do this?
public void myMethod()
{
//stuff in...
if I needed to run a program 4 times and wanted to store each of the values I got through previous runs of the program to arrays, would I need to make 4 different arrays or is there another way of...
Nevermind I got it!
This might be a stupid question to some people. Sadly I am a rookie programmer. This is my task: Display the contents of the array by using a
method that receives the array as a parameter and uses...
public static void idNumberSort(String[] array)
{
int startScan, index, maxIndex, maxValue;
for (startScan = 0; startScan < (array.length-1); startScan++)
{
maxIndex = startScan;...
import java.util.Scanner;
public class Lab8_Ex2
{
public static void main(String[] args)
{
int age;
int beatsPerMinute;
boolean heartRate;
Lab8_Ex2.java:22: cannot find symbol
symbol : variable heartRate
location: class Lab8_Ex2
targetHeartRate(heartRate);
^
Lab8_Ex2.java:24: cannot find symbol
symbol :...
sorry I pasted it wrong. here it is!
import java.util.Scanner;
public class Lab8_Ex2
{
import java.util.Scanner;
public class Lab8_Ex2
{
public static void main(String[] args)
{
int age;
int beatsPerMinute;
thanks for the advice, I'll keep this in mind while constructing my pseudocode.
thanks for the replies.
it does compile however it does not do much if anything like you said.
yeah that's pretty much the goal of this program. I just have to count the number of instances that...
/*This program will allow the user to search for a particular
file he/she desires and count the number of times a particular
substring occurs in the file.
*/
import java.util.Scanner;...
I have this programming assignment which calls for:
1) The user to enter a file to use.
2) Then the user enters a particular sub string to search for.
3) The object of the program would be count...