No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Re:
How can i insert a decimal point into either an integer or a String(probably a String), 2 decimals from the right? like with money? eg/ 13922 139.22 |
|
Re:
Hello, I've worked on some code for a project I have to do but I'm a little unsure about a few parts that I was hoping somebody could provide some clarity on. Here is the project that I'm working on with the code and question on it to follow: Write … |
|
Re:
There were two other variation which I completed but I am confused with this one: Write a method for each triangle variation. Use nested for loops to draw the triangles. Variation 3: /** Precondition: width is an odd number >1*/ public void diamond (int width) { } if width = … |
|
Hey, getting a new error in my code... Its almost done, cant figure out what is wrong with this. ERROR: non-static method isPrime(int) cannot be referenced from a static context [CODE] import java.util.Scanner; public class primenumbertest { public boolean isPrime(int x){ int divisor = 1; do{ divisor += 1; } … |
|
[CODE] import java.util.Scanner; public class primenumbertest { public boolean isPrime(int num){ int x; Scanner input = new Scanner(System.in); System.out.print("Enter a number to find out if it's prime or not (greater than 1): "); num = input.nextInt(); if (num == 2) return true; // check for divisible by all even number … |