System.out.print()
vs
System.out.println()
public class Insurance
{
public String name;
public int age;
Type: Posts; User: GStateSwish
System.out.print()
vs
System.out.println()
public class Insurance
{
public String name;
public int age;
The main problem is the variables assigning to themselves.. forgot to mention that the first time.
fix the variable assignments.
in your second constructor you are also doing something weird
...
First, inside of your constructors, declare your variables appropriately
i.e
public Insurance (String name .. etc){
this.name = name;
}
the way the class will determine which name to use....
the problem is where your system.out.println statement lies in your first code.
the question instructs for there to be a method of void type called print. You should replace that print statement...
import java.util.Arrays;
import java.util.Scanner;
public class wellOrderSorter {
private int startCount;
private int maxCount;
wellOrderSorter(int number)
{
...
need to create a code that sorts for "well ordered numbers", ie (1<2<3 , 4<7<9.)
Initially had trouble through the use of a string char evaluation being sufficient, changed it to OOP to complete...
1. fair enough on the addition of comments.
2. copy-paste issue.
3. I'm about a month or so into seriously learning java. I know what ood is but have no idea of how to write in ood just yet.
...
i guess its clean enough..
whats going on everyone?
Can anyone provide tips or suggestions for cleaning up this code?
the code functions properly, i'm just seeking tips to improve its readability or general tips.
/*...
I am receiving an error variable might not have been initialized near the end of my program.
The program itself is a bill calculation example in which the bill is calculated on which type of...
Thank you for your response. I was able to fix the program with your suggestions.
originally line 32 was the declaration:
accountType = (char) inFile.nextByte();
I do also realize my coding is...
I attempted to post this in switch however was unable
Hello,
I am currently learning java programming and have attempted to construct a program that reads a customer's account number (int...
Hello everyone. I am a computer science undergraduate student seeking to help learn, and eventually help advise on java programming coding.
I live in the Atlanta area.