35,618 Topics
![]() | |
spiral matrix for n*n order 1 2 3 4 12 13 14 5 11 16 15 6 10 9 8 7 . It is for printing a spiral matrix when n=5. It gave a correct output only for the elements on the sides. view sourceprint?01 class spiral_matrix 02 { 03 … | |
Hey everyone, I am working with arrays, my program needs to take a list of 10 numbers and put them in each array depending on if they are even, odd, or negative. My program compiles but it does not run correctly it only displays 0 for each list. Thanks in … | |
In a folder I only have 2 files. Main.java and ArrayQueue.class Main.java is the following: [CODE] class Main{ public static void main(String args[]) { ArrayQueue s = new ArrayQueue() }} [/CODE] But it throws an error stating the following: C:\Users\Jatin\Documents\NetBeansProjects\JavaApplication3\src\Main2.java:11: cannot access ArrayQueue bad class file: C:\Users\Jatin\Documents\NetBeansProjects\JavaApplication3\src\ArrayQueue.class class file has … | |
i need to input text in a textfield like accountbalance,withraw,deposit,and functions of "cancel","Enter","Deposit",Withdraw, and i need to give a receipt after the transaction. i need help you can add in my yahoomail <EMAIL SNIPPED> [CODE]import java.awt.*; import javax.swing.*; import java.awt.event.*; import java.util.Scanner; public class ATM extends JFrame implements ActionListener { … | |
how do you insert a database mysql,xampp in netbeans. object oriented?. | |
Ok!!i have a 2d array..n i created a letterTray which is taking 7 letters from the letterbag which was already created..now in the JoptionPane in the String by giving 3 numbers..the 3 numbers will represent the row number, column number and the letter number..how do i do it??here is my … | |
I tired of solving this problem but believe I'm missing something. I'm not receiving values from request.getParameterValues of "mmsTitleAdded" Here is the process I'm using: This <tr> contains the MMSCategory list and onChange a javascript function is called which gets the the list of all the mmsTitles of that category: … | |
Direct web remoting enables the Java Script in a web browser to interact with the Java code in a server and vice versa. Hence, the java object is serialize to the client and the client will deserialize the object. My Question: Is the Java script object serialize to the server … | |
Hi how can I replace "null" from being displayed with an empty string in a textbox on the JSPs ..depending on textbox data availability.. I tried the code [CODE]<% String phone=userInfoObj..getPhoneno(); if(phone==null||phone.equalsIgnoreCase("null")) phone=" "; %> <td > <input type="text" name="phoneno" class="txtBox" value="<%=phone %>"></td> [/CODE] but still it displays null can … | |
Okay, I'll just post my code and see what you guys can make of it. I'm getting the error that the 'main' class could not be found, but as you can see I have it in the code. Thanks for the help! [code=java] package macey; /** * @author Mike */ … | |
Hey guys, my Professor want us to come up with this code: Create a class called Student. This class should have the following twelve private data elements: String studentName String studentEmail String studentLocation int projectGrade1 int projectGrade2 int projectGrade3 int projectGrade4 int quizGrade1 int quizGrade2 int finalExam int participationGrades This … | |
Hello everyone, I am trying to get an ActionListener to work in Java. On lines 310 and 312 it says 'cannot find symbol: variable calcDisplayF'. I am a complete noob when it comes to Event Handling so any help on this subject would be greatly appreciated. Here is the code … | |
Hello I want to write a loop that quit the loop if the user hits Enter or there is negative number. this is what i have so far. it only quits the loop if user enter characters. [CODE] import java.util.Scanner; import java.util.ArrayList; public class loop { public static void main(String[] … | |
Hi there, Im stuck on my assigment :s the problem is everything is compiling but the program is not doing anything. 1st I need to call repaint() if slideBlock return true and I don't know how to. 2nd problem not sure if the slideBlock method is 100% right. [ICODE]boolean slideBlock(int … | |
Correct Sequence of brackets is always of primary importance both for written programs and mathematical expressions. By correct sequence we mean that for every opening bracket there is a closing bracket. The problem is to write a program that takes a random sized (size max 15) input of brackets from … | |
I would like to draw a curve between any two points using java...I have the points from a calculation result in the program, all I need is a function that helps me to draw a curve, can any one please help me out with dis, m kind of at a … | |
I was writing a program and I wasn't sure sure how to do letter b. I have the methods and constructor but I'm not sure how to format the float. 2. Create a class called Item. a. Item will need instance variables itemID, itemName, inStore, and Price (of types String, … | |
I know this is probably seem to be very easy for you guys. I have been trying to figure this out for three hours. The requirement ask me to write a method determine whether an integer is even or not. If it is true, return true. If it is false, … | |
eish am strugling with this binary tree.huffman code and i ave an assignment,have a look on that You are given a text file. Any printable character, including digits and punctuation can be present in the file. Newlines and blank spaces can be present as well. Your job is to write … | |
hi, i would like to ask opinion and comment about my situation.actually i dont know where to locate my thread because i dont know the specific of my question. im developing a web-base system.i use 3-tier architecture.im using html n php in gui,database mysql and for the application im using … | |
I have this Caesar Cipher program, but it's decoding function is buggy. When you try to decode ABCDEFGHIJKLMNOPQRSTUVWXYZ it should return NOPQRSTUVWXYZABCDEFGHIJKLM but instead it returns DEFGHIJKLMNOPABCDEFGHIJKLM. I believe the code is in lines 36, 37, 43, & 44 and occurs when c becomes negative but I don't know how … | |
i know that i should use this to compile all the java classes . i used these and its working great. but i dont understand all of this . i did some readings and i understand now that when i use "set" , it sets the varibale name to the … | |
Hi,everyone Im new to JAVA and not sure how does recursion work in JAVA I have to use JAVA Turtle to draw snowflake here is the pseudocode. procedure snowflakePart( S, N ) : if N is greater than 0: move turtle forward S units if N is greater than 1: … | |
How can i continue a very long sentence on the second line in a JLabel? /n does not work /t does not work as well I dont want the html thing cause i have a simple application. Thank you | |
I have a program that randomly flips a quarter 100 times. The results gives me a list of heads and tails. I need the results to look like this: 100 Flips resulted in 49 heads and 51 tails. With varing numbers for heads and tails. Thank you for any help … | |
though the maortgagae cals works correctly the answers are not i columns [code] import java.io.*; import static java.lang.Math.*; import java.util.Scanner; import java.text.DecimalFormat; import java.text.NumberFormat; /** * @(#)AmortWeek3.java * * AmortWeek3 application * * @author * Week 3-Service Request SR-mf-003 * Change Request 1 * Display breakdown of monthly payments * … | |
Im planing to have several Methods that will display the question and the answer choices to their coresponding labels and cmdButtons. But somehow i get the error message "void is an invalid type for the variable" when i want to create my method below of my code (i commented the … | |
(1,1) (1,2) (1,3) (2,1) (2,2) (2,3) (3,1) (3,2) (3,3) (1) (2) (3) (4) (5) (6) (7) (8) (9) | |
hi.. im an amateur in java and im having problems in switch statements.. i would appreciate if you would help me solve this problem.. [B]Problem:[COLOR="Red"] Write a java program that will let the user input 2 colors and display the result color..[/COLOR] [/B] [COLOR="Green"][B] This is what i come up … |
The End.