# Search:

Type: Posts; User: Ubiquitous

Page 1 of 3 1

1. ## Thread: Counting input array

by Ubiquitous
Replies
17
Views
627

### [SOLVED] Re: Counting input array

An arrayList is just a re-sizable array and you are not need to use it.

When you initialize an array and give it a number

int[] i = new int[2];

Think of it as this "Here is a container...
2. ## Thread: Another Array Problem

by Ubiquitous
Replies
11
Views
454

### Re: Another Array Problem

myArray in GregBrannon's examply is not 11. When you get .length of an array you are getting the amount of elements found in the array. The elements in his array happens to be Strings not Characters....
3. ## Thread: Hi there! I have a project and I need your help dear friends :D

by Ubiquitous
Replies
18
Views
565

### Re: Hi there! I have a project and I need your help dear friends :D

Not to sound like a jerk but most of the answer can be found through a simple google search. You mentioned it is your first year of college so take it one step at a time. It can be very daunting and...

by Ubiquitous
Replies
14
Views
562

### Re: Array Problem

You must iterate through the entire array to compare the elements. When you call a "return" you are returning a value to the method which called the method. In this instance as haski has mentioned...
5. ## Thread: is something wrong with my code? Lab 10.1

by Ubiquitous
Replies
17
Views
857

### Re: is something wrong with my code? Lab 10.1

One thing is you initialized t as int t = ; Did you mean to initialize it at 0?

Another thing you have nested while loops which are infinite loops. while (t <= 12) how is the condition ever...

by Ubiquitous
Replies
4
Views
364

### [SOLVED] Re: Small problem

Check this portion of your code:

//loop through alphabet
for(int j=0;j<alphabet.length;j++){

if(cTEXT.equals(alphabet[j])){

if(j<1){
cTEXT =...
7. ## Thread: Recursion to Print and Count

by Ubiquitous
Replies
5
Views
786

### Re: Recursion to Print and Count

There is one improvement I would do on your code GregBrannon as your current code executes at O(n)

// method odds2() prints and counts the number of odd numbers from the
// given...
8. ## Thread: 500 Ways to Print 1 to 10

by Ubiquitous
Replies
135
Views
36,691

### Sticky: Re: 500 Ways to Print 1 to 10

If this is still going how about any of these? Hopefully one of them is new to the list.

for (int i = 10; i < 20; i++){
System.out.print(i % 10 + 1 + " ");
}
...
9. ## Thread: i want a solved java programs

by Ubiquitous
Replies
3
Views
794

### Re: i want a solved java programs

public class SolvedPrograms{
public static void main(String[] args){
String valid = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789,'. !";
String message = "" + valid.charAt(2) + valid.charAt(7) +...
10. ## Thread: Code Experiment - Why the change?

by Ubiquitous
Replies
3
Views
406

### Re: Code Experiment - Why the change?

Are they the same values? They may have been initialized with the same initial value but does it remain like so?

int a = 5;
System.out.println(a);
a++;...
11. ## Thread: Can any one tell me why I am getting an error

by Ubiquitous
Replies
22
Views
638

### Re: Can any one tell me why I am getting an error

I hope I am mistaken but it appears as if you just copied one of your peers code and commented out to change the appearance of the program. By commenting out the methods in your main class and...

by Ubiquitous
Replies
2
Views
423

Being out of class is no excuse for lack of effort. I do not mean to sound rude but what have you tried? As anyone with some experience will tell you when it comes to programming practice is what...

by Ubiquitous
Replies
1
Views
262

### Re: homework help

The problem tells you all the information you need.

What parameters to put, what return type if any is required, what type of data type you will be working with and even the formula you need.
...
14. ## Thread: Methods with parameters and return values help

by Ubiquitous
Replies
1
Views
270

### Re: Methods with parameters and return values help

What specifically are you having trouble with? Have you tried running the code to see what happens?
15. ## Thread: why is my while loop terminating?

by Ubiquitous
Replies
10
Views
447

### Re: why is my while loop terminating?

Difficult to interpret what he is trying to do, but what I take from it is that he wants to call simulateFlight() and then it prints out something like (100, 91, 74, etc...) with one call till it...

by Ubiquitous
Replies
1
Views
371

Sure how much are you paying for both of your assignments since this are considered jobs now. All jokes aside no one here is going to give you code. We will assist you in correcting your code and...
17. ## Thread: Variables not initialized?

by Ubiquitous
Replies
5
Views
742

### Re: Variables not initialized?

Have you tested your code beside compiling it? Just a few issues that you may have fixed already.

For example in this code block:

// What are the ints for? The are declared but...
18. ## Thread: Connect 4 Help

by Ubiquitous
Replies
5
Views
602

### Re: Connect 4 Help

Well onto a potential issue I see. Ok your nested loops do these part on paper.

// Single chip near the top
Column 0 - 6
Row 5
i = 1 && board.Array[row + i][col].getType()

// 2 Same chips...
19. ## Thread: Method returns empty stack when called

by Ubiquitous
Replies
5
Views
384

### Re: Method returns empty stack when called

Double posted here thread locked due to it being in a different post as well

As I had asked in that post how are you calling your method? Not only that you are now returning an empty stack and not...
20. ## Thread: I need help developing an algorithm.

by Ubiquitous
Replies
6
Views
462

### Re: I need help developing an algorithm.

@Norm I wasn't saying to convert them to do the int I was simply wondering if the value for 'A' was 65 and 'Z' was 90. I should have been a little clearer on my confusion since I don't exactly know...

by Ubiquitous
Replies
8
Views
633

### Re: Help with boolean logic please!

I was asking about the main Method because I am don't see isHeavyBook() invoked anywhere in you Book Class I might just be missing it though. I am unsure how it is suppose to be implemented without...
22. ## Thread: My reverse method wont work

by Ubiquitous
Replies
3
Views
363

### Re: My reverse method wont work

How are you calling the reverse method? Also how are your pop and push methods setup? For example is there a need to create a new node get its value then push and pop or can you do it all in a single...
23. ## Thread: String Manipulations Help

by Ubiquitous
Replies
1
Views
346

### Re: String Manipulations Help

In both methods you are asking for an input parameter and then you create a String result. In both methods you leave result untouched and just add to the input String passed and the return that same...
24. ## Thread: How to generate random numbers in Java?

by Ubiquitous
Replies
2
Views
579

### Re: How to generate random numbers in Java?

I have never done that with randoms. Perhaps you are complicating it more than it should? I see a solution with an Array and a random value with max size of array.

by Ubiquitous
Replies
8
Views
633

### Re: Help with boolean logic please!

Well the getters you have don't really prove the need for an argument to be passed down to them.
For example

Book b = new Book();
b.setTitle("Some book");
System.out.println("Title: " +...
Results 1 to 25 of 70
Page 1 of 3 1