In my method addMatrix I return the array result. I then try to call it in my main method to print out, however it gives me an error saying it cannot find the variable. Since I returned it shouldnt I...
Type: Posts; User: ColeTrain
In my method addMatrix I return the array result. I then try to call it in my main method to print out, however it gives me an error saying it cannot find the variable. Since I returned it shouldnt I...
//matrix1
double[][] matrix1 = {{1, 2, 3},{4, 5, 6},{7, 8, 9}};
//matrix2
double[][] matrix2 = {{0, 2, 4},{1, 4.5, 2.2},{1.1, 4.3, 5.2}};
addMatrix(matrix1,...
I dont think so... because my sortArray method doesnt work how I thought it would...
First of all, thanks so much for the reply! Option 2 sounds like what i want to do. Because I do not need the duplicates. However, how would I go about zeroing them out and only printing non-zero...
Like i said. I cannot use separate classes, they must all be in one. My question is how can I go about sorting them... I don't have a clue how to sort the scores.
This all has to be in one class. Thanks for the response though!
I am making a program that asks for how many students and based on that answer a number of boxes come up asking for their name and their score. After it is supposed to sort them from best score to...
So my code asks a user to enter 10 numbers, it then checks to see if the number is already in the array, then prints out the entered numbers in a dialog box, but does not print duplicates (i.e. if...
Scratch that. I fixed it.
Thanks! Works perfect now. I figured d stood for double, good to know. I appreciate the fast and informative response!
public class test {
public static void main(String[] args) {
double meter;
double foot;
double x = 1;
double y = 20;
System.out.println("Feet...
I was making a program that told you whether or not the integer you entered was divisible by 5 and 6, 5 or 6, 5 or 6 but not both. The first 2 worked fine with the way I did it and displayed true or...
I am programming in NetBeans. The default console output is normal black. All i need is to bold it.
I am creating a program that prompts the user to enter a year and the first day of the month, Sun=0, Mon=1, etc . . . then shows that years calendar with the correct number date placement, but I am...
When I use that format it is actually turning my text gray and not bolding it...
String bold= "\033[1mJanuary\033[0m";
System.out.printf("%100s\n", bold);
Well the thing is this is for a class I am taking and the teacher wants it bold, yet he didn't teach us how to bold and I can't find it in the book anywhere. Thanks for the help.
The program I am creating displays the output into the console and prints out tables. I want the header of these said tables to be bold, how can I do that?
here is what I want bold:
...
nevermind, i actually ended up figuring it out.
Heres what I ended with:
import java.util.Scanner;
public class Pg127 {
heres what i have so far... dont have the divisibility equation yet.
import java.util.Scanner;
public class Pg127 {
public static void main(String[] args) {
//Input...
well actually it doesnt have to be boolean i realized. I have no idea how to see if a number is divisible by another, so help needed there. But as for the data type i just need one that states true...
i am making a program to see if a number is divisible by 5 and/or 6. how do i do this using a boolean? the user inputs and int and then i calculate it and tell them true and/or false. thanks
what do you mean "something correctly" and "something done wrong"? Could you provide an example please? Thanks for your response
So i am writing a code to display the windchill temperature, the user enters a temp and windspeed and they are given the windchill temp. The thing is they have to enter a temp within -58F and 41F, I...
how do i do that?
Thanks for that. the first 5 months can be displayed in the code, but the 6th is all that is wanted in the dialog box after running the program. I just didnt know if i had to manually put in all the...