No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
I am doing a simple program to calculate the first 15 fibonacci numbers and also placing an asterisk next to even numbers. My output should look like this: 1 1 2* 3 5 8* 13 21* 34* 55 89 144* 233 377 610* I can calculate the numbers easily enough … |
|
I am trying an example from my CS class. We learned recursion recently, and one of the examples I was given was to reverse a given string. The Java program compiles correctly, but when it is actually executed, instead of getting the intended result, I get this as my outcome. … |
|
ok so im a new programmer and im making a tic tac toe program and i got this error `"operator && cannot be applied to boolean,java.lang.String"` in the crazy long line in the winner method and am not sure how to fix it import java.util.Scanner; import java.util.Random; public class tictactoe … |
|
hi! First of all sorry if my english is a little poor I want evaluate a text box named txt1, the focus shouldn't exit from the text box until the user write any in it. This is my code: [code=java] txt1.addFocusListener(new FocusListener() { public void focusLost(FocusEvent e) { if (((Text) … |
|
Hello, Please tell me in Java we don't have a multiple inheritance? so,in which function we use these inheritance. Thanks |
|
Hi all, I have searched about difference between KeyPressed and KeyTyped Events but still I'm not clear about that . One thing I have found is Keypressed is triggered first than KeyTyped . Please clarify me when these are triggered exactly . Which is appropriate to use for which purpose … |
|
Hi all , I'm trying to display currency in Indian format but I'm getting question marks symbols instead of digits . Please tell me how to sort out this problem . Thanks in advance |
|
Hi all , I'm trying to do find and highlight program which finds a given word by highlighting it in the textarea. I'm finding the word in a textarea which has both vertical and horizontal scrollbars .if the word is with in the visible area everything is fine but if … |
|
I have these two classes Maze and MazeCell. I have a problem with the Maze constructor in Maze Class and do not know how to access it, or test it. Does Maze N = new Maze(row, col) do anything. I know it's supposed to set it as the length of … |
|
currently I am randomly generating a set of number from 0 to 7 in decimal in array..then I hav to convert them in binary form... however,i fail to get it.. any mistake i did?hope to get some advises from u .. public class Initializationtest { public static void main(String[] args){ … |
|
Hi all , I'm new to Networking programming in JAVA .I want to send messages across hosts which are in the same Domain without using any Server program . I'm not clear whether to use UDP or TCP . Give me some ideas and links which are useful to accomplish … |
|
i need help with a project. Is it possible to display an 1 dimension array in GUI without using a loop? If it is can you send me the codes? i was ask to enter the numbers like thise Example: Enter numbers: 3, 4, 1, 5, 6 then it should … |
|
I'm new to Java and I'm wonder if someone can help me with this. I have a class that's constructor makes a Gui window, and it's main calls this constructor. The problem is the event handling doesn't work because the event handling code can't access the GUI window variables (It … |
|
Hi all , I had created a Document using jTextPane which I will use as a Template to create customize ones . For eg : I will create something like this in a Document using jTextPane Hi [B][I][U]<name>[/U][/I][/B] and I will open this Document in another jTextPane to replace <name> … |
|
Hi da, Suggest me good books for Swing and JDBC(apart from Sun tutorials -which I will use) . I have basic knowledge of Swing which I read from Head First Java but I don't know anything about JDBC. Now I want to explore my knowledge in Swing and I'm going … |
|
this is the homework I have to do [QUOTE] This homework is due in week 3. You must work on the program outside the formal laboratory sessions. The program must be ready to be executed at the start of the scheduled laboratory session. Remember you may be asked to explain … |
|
Hi, I'm terribly new at java, i created a program for a poster availability system and there are 8 errors that I have no idea how to resolve. The program is meant only to run at the command prompt. The errors are: C:\Project\Enrol.java:46: cannot find symbol symbol : method getID() … |
|
Create a non-GUI based Java application that calculates weekly pay for an employee. The application should display text that requests the user input the name of the employee, the hourly rate, and the number of hours worked for that week. The application should then print out the name of the … |
|
Hi all, I'm learning Serialization in JAVA . I learned that [B]"an array object is serializable as long as the things in the array are serilizable"[/B] . [COLOR=Green] I just need a clarification on that statement[/COLOR] . To understand that concept I myself coined a simple program . Here it's … |
|
Hi all , [U]Here are my questions :[/U] I like to know when to use Serialization and when should the preference will be given to Database to persist an Object . To use a database with Java at what level a programmer should be good in Database ? what are … |
|
morning everyone. i hope someone out there could really help me. im trying to store large numbers. as i need to complete my work under Dev-c++ environment but im not familiar with it as i just started using it recently. the following is my initial coding for my work. [code=cplusplus] … |
|
Hey guys, I am writing a program with functions that does different things for a user. This is a program i am writing for school and my lab teachers are horrible at helping us. The problem is that i get an illegal case error for all my cases (five cases). … |
|
I am having issues getting this function to work. This is a currency conversion program that gives the user choices of input of three other currencies other than USD and converts it. It is supposed to be a value returning function, not a void function. The program compiles, runs fine, … |
|
this is my current code: [code] #include <iostream> using namespace std; void celsius(double); //Main int main() { cout << "Now displaying the first 20 fahrenheit temperatures and\n" << "showing the Celsius equivalent.\n"; //Loop for displaying the table for (int couter = 0; couter <= 20; couter++) celsius(couter); return 0; } … |
|
Hey. I'm having some problems with creating user defined functions. [code] # include <iostream> using namespace std; int num1, num2, x, y; int perimeter (x,y); int main () { cout << "Enter the length and width of the rectangle: "; cin >> num1, num2; perimeter (num1,num2); cout << "The perimeter … |
|
i have this problem my file Computer.java is in desktop but not work :$ [CODE]public class Computer { public static void main (String []argv){ System.out.println("BllaBllaBllaBlla"); } }[/CODE] here is the screenshot [URL="http://aycu40.webshots.com/image/30159/2002091781242929104_rs.jpg"]http://aycu40.webshots.com/image/30159/2002091781242929104_rs.jpg[/URL] |
|
I have to write an interactive program using scanf() to read in seven strings input by the user. The program should print the seven strings as a list, then sort them alphabetically and print a new list. I have to use the function strcmp() to assist in the sorting of … |
|
[code] #include <iostream> #include <string> using namespace std; float input_div(string); void findHighest(float, float, float, float); int main() { float nE, sE, nW, sW; nE = input_div( "North East" ); sE = input_div( "South East" ); nW = input_div( "North West" ); sW = input_div( "South West" ); findHighest(nE, sE, nW, … |
|
I don't know why I'm spacing out tonight, because I've been doing fine, but I'm stuck on one thing. I've already written the first part of my program (get integer input from the user, then calculate the product, and display), but the second part (not required, but I thought I'd … |
|
Good Morning! I am trying to create a Book2 object and assign to Inventory_Program6a. When I try the following: Book2 newBookTitle = Book2(); I get the error message: C:\java>javac Inventory_Program6a.java Inventory_Program6a.java:325: cannot find symbol symbol : constructor Book2() location: class Book2 Book2 newBookTitle = new Book2(); ^ 1 error I … |