can you explain it in english please? if you know what i mean.. :)
Type: Posts; User: mamaass
can you explain it in english please? if you know what i mean.. :)
edited it. the output if i run the code is there. i added comments in between the codes to let you know what i did.
Hi, my prof. asks us to write a conversion program in from binary to decimal, decimal to binary, etc.. It should have a menu system and a method should validate if the user input is number and is in...
i made some changes on this one and has no errors on it.
import java.util.Scanner;
public class assignmentA
{
public static void main(String[] args){
int[] newArray;
what will i do so that it will check the element that the user's input and make sure it's not less than 4?
ok i changed some of the parts to
import java.util.scanner;
public class assignmentA
{
public static void main(String[] args){
int[] newArray=new int[5];
how can i use an array in an if statements then? kinda confused when i put them together. its not state in the toturials.
i tried the if statement.
import java.util.scanner;
public class assignmentA
{
public static void main(String[] args){
int[] newArray=new int[5];
reading it now. in this case, what would you use? while loop or if-else statement?
im trying to to check all the elements that the users will be inputting if it is less than 4. if it is then it must show this:
System.out.println("The number "+ newArray +" is less than 4!");
yes. i will be changing that in a bit. the name of the file should be the same with the class name.
do you know how to fix that one? it says i need to make the the number that user inputted so...
technically, i only have 2 errors since the 1st is easy to fix. anyone knows how to fix the remaining two?
ok i have checked again and the errors says.
Main.java:3: class assignmentA is public, should be declared in a file named assignmentA.java
public class assignmentA
^
Main.java:10:...
i compiled it in an online compile called Codepad and the error only says
error: 'import' does not name a type
Hi my professor wants me to make a program this this set of guidline.
i don't know if my code is correct and have any errors, please if you see any, try to tell me what it is and how to fix...
import java.util.Scanner;
public class assignmentB
{
public int calc(){
int number1;
int number2;
int number3;
int sum;
this is the program that i need to do
You are required to write a command line program in Java that declares three numbers.
Write a method called calc() that takes in the three numbers as...