YouTube videos have their place, but its important to understand the basics that you would pick up from a good computer science book. Especially just starting out. The text books are normally laid...
Type: Posts; User: jbarke12
YouTube videos have their place, but its important to understand the basics that you would pick up from a good computer science book. Especially just starting out. The text books are normally laid...
also another thing to add... you don't have return type on the method signature.
public static int getInt() { // is what that line should be.
You should then be able to put either of the...
We don't do the work for you. Please show us what you have tried and let us know what problem you are having at a given point. We are more then happy to help you understand and progress your...
what have you tried?
You don't know how to set up the rest of the methods?
First things first, if I were you I would start by setting up all of methods. Read each instruction carefully and get the signatures right.
public static void main(String[] args) {
...
In all honesty because most of us have done these assignments and have learned what we need to from them. This is suppose to be training you for a future job. We will help when there are issues,...
Do you have any specific questions? We don't do the assignment for you.
Where is the code you have tried?
Try something like
String s= input.next();
System.out.println(s);
after your hello world print statement
Scanner is just an object. You haven't called any of its methods to have it do anything.
System.out.printf("Population Density: %s", NumberFormat.getNumberInstance(Locale.US).format(populationDensity(density)));
//this should convert your integer to a String representation of that...
public class Demo {
public enum Month {
JANUARY(1), FEBRUARY(2), MARCH(3), APRIL(4), MAY(5), JUNE(6), JULY(7), AUGUST(8), SEPTEMBER(9), OCTOBER(10), NOVEMBER(11), DECEMBER(12);
...
Making android apps are fun, but do you know basics of programming or is this your first experience with programming?
item is a String. You are comparing an int to a String in item!=999. Your issue would be because of this fact.
--- Update ---
The other issue you are having is outFile doesn't exist. My...
I bet if you defined two different arrays to pass into your scenes you wouldn't have this problem
class Account{
double balance;
String name;
Bank bank;
Account(){ //default constructor
this("", 0.0, null);
// bank = new Bank(); //Is this necessary?
}
//fully specified...
It works with package stringvars; if that is the true name of your package. My only thought is the name of your package was incorrect otherwise it should have run just fine
I would. Basically start with your if statement with the square root. Within that block define what happens if a is above 0 and if a is 0 then do the same thing in the else part of your block for...
I answered the questions in the code
import java.util.Scanner;
import java.util.ArrayList;
class Bank{
double balance;
//Account account;
ArrayList<Account>account = new...
The reason it is printing twice is because you do your check on the square and then on a instead of doing them together.