Thanks Norm.
I don't get it. I'm trying to turn x into a string. And x is all over the place.
There are a lot of problems in this code.
Type: Posts; User: JohnJohnson123
Thanks Norm.
I don't get it. I'm trying to turn x into a string. And x is all over the place.
There are a lot of problems in this code.
public class Rectangle {
private final int width = 0;
private final int height = 0;
public Point origin;
// use:
public Rectangle() {
origin = new Point(0, 0);
...
I thought it was more fun like this. I saw it on stackverflow.
Thanks for the ongoing support.
It did not work out for me.
How about this. Find the three largest numbers and print them out.
public class Minmax2 {
public static void main(String[] args) {
int max =...
StdIn is used in my textbook, Introduction to programming in java. It's a library thing for all kinds of inputs.
Your right. But I think I can use it like that and press ctrl+enter
--- Update...
Hi.
I'm trying to find the largest and the second largest number in vector. But I can't.
Can you help?
public class Minmax{
public static void main(String[] args) {
Hi.
I'm wondering, does anyone know of another program like Jeliot?
I'm looking for a new one because Jeliot does not support StdIn or StdOut and I'm hoping
that there exists another one that...
I'm trying to write a program that splits string up and prints it backwards. But it does not work.
My questione: When I type domain name www.apple.com after pressing enter nothing happens until I...
It seems that #13 was correct. Thanks for your help and patiance.:)
I'm wondering. Is this something to build on...
I'll have to ''build'' the methods again...but than again the other stuff I got is trash...
public class Sample1{
//public class Sample1...
I'm lost...
public class Permexamp1{
//Reading the vector with StdIn
public static int [] getUserInput(int N)
{
//int N = args.lenght;
I tried some changes at the bottom, I tried changing the sequence of the creation of the arrays. With the input {2,2,2,2} the program prints out:0
...
I'm thinking...two things perhaps I can ''ask'' first for N and then do system out print to ask for M. Or keep the code that I've got[ain't that just the code of my dreams...hahah] and create N...
I think the problem is that I'm not thinking this correctly. If I put for example 5 and 2 in command line the vectora.length(N) is 5. Then the program starts to parse(move) 5 and 2 into vectora but...
Thanks man.
That goes a long way.
I still get this error message. I'll look in tomorrow.
>java Permexamp 5 2
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 2
...
I don't get it. How do I make it public? (Do you put it like that?)
Example values: Well the Vectora is supposed to be larger, because that is the array wich M is suppose to read from. So N>M, hopefully. I tried with 5 and 2 from the command line, nothing happened,...
I have a problem with this code. The program is supposed to read a vector with Standard Input and choose randomly from that vector, put those numbers in another array and then print that array out....
Check this out.
What is wrong?
public class
{
//Finding the max and counting them
public static double max(double[] a, int lo, int hi) {
if (lo < 0 || hi >= a.length || lo > hi)
When I put the print statement in main and the second error message in static.
This is my problem a have got the concept, almost(hahah), my problem is the scope and chooing the right method and...
My program is supposed to read a file and return the number of highest value in the terrain, count the peaks so to speak.
My problem is the scope and print out.
Hi!
I'm trying to write a program that counts the highest value in a matrix .
It does'nt work. What is wrong with it? If I put System.out print at bottom of main all hell breaks loose.
So...here...