32,204 Topics
| |
Hello This is a demo showing Java interacting with Daniweb's new API ( http://www.daniweb.com/api/documentation ) You introduce a member's name and it should show you the total number of posts he has made. Demo is a proof of concept: No bug checking, error checking, etc is in this code. In … | |
import java.util.Random; import java.util.Scanner; public class RandomDeck { String suit[] ={"Diamonds" , "hearts" , "spades" , "clubs"}; String face[] = {"A" , "Two" , "three" , "four" , "five" , "six" , "seven" , "eight" , "nine" , "ten" , "jack" , "queen" , "king"}; String cards[] = new String[52]; … | |
hello i am working on a simple panting project that allow the user to select a shap from ComboBox then draw it on the panel but problem is when is choose any type of shapes and drawing it on panel no shape appear on the panel ?! here is my … | |
1. Given a length of wire P units long, where P is an integer, it is possible in some cases to bend the wire into an isosceles triangle(with two sides equal) where the lengths of all the sides are also integers. For example a wire of length P = 3 … | |
I once did a project in a class that connected to a mySQL database, but now I'm using the jGRASP ide on a mac and the class files won't compile properly. In the project we added the files: Connection.class, ResultSet.class, Sql.class, and Statement.class to the directory (assuming it's the middleware). … | |
Ive been working on pathfinding algorithms for a couple weeks now and A Star has me stumped. Right now i am attempting to Pathfind over a maze in a matrix of the form boolean map[x][y][5]; where index 0-3 are the walls on the cells starting on the right with 0, … | |
Hello, I have a set of fields which I need to save into my database, my problem is that the format with java and mysql doesn't match. I converted everything to String which works but I need to store the data as Date. As I will need to retrieve information … | |
Hey everyone I was programing a small game and I am trying to figure out how to send an int value to a class and return a String from it. This is my code: This is my main.java class public class GamGUI { /** * @param args */ public static … | |
hey there everyone. I hope you're all well. Alright, I am working on testing a project using Selenium. I know that this is a Java forum and not a Selenium one, but I am used to using this one so I am starting here. Plus, I am very confident that … | |
I am learning to build.xml a project with eclipse ide. below is the MANIFEST.MF that I am creating. The build shows that the manifest is being written in the dir structure below. The dir META-INF (sibling to the src) contains this MANIFEST.MF [code] Manifest-Version: 1.0 Ant-Version: Apache Ant 1.8.1 Created-By: … | |
Hi guys, I'm having trouble with my code and I'm kind of new in Java so I don't know what to do. I have to do a program with Buttons and each button has to take me to another class (I don't know if I'm being clear). For example if … | |
hi folks, i want to develop a desktop application which will continuously receive text commands from a connected mobile device, via bluetooth rfcomm protocol. i went through hundreds of code examples, including jsr-82 bluetooth & obex api demos; but cannot get what i wanted. one of the popular examples that … | |
Just some information about myself. I am a 42 year laptop technician returning to college majoring in an Application Development associates degree program at community college starting this summer 2013. I really need some information from the experienced programmers who have been in the job market market for a while. … | |
I have been stuck on this problem for a while. I can't figure out why it is skipping over the last part of my program where it starts double totalMoviePrice. Here is what I have: import java.util.Scanner; public class OnDemandMovieHits_AngelaBrasley { public static void main(String[]args) { String[] movieName = new … | |
Is the following Code correct, for calculating Decimal to Triskaidecimal and Triskaidecimal to Decimal, I hope this code is not right import java.util.Scanner; public class converter { /* 1) Decimal To Triskaidecimal 2) Triskaidecimal To Decimal 3)Exit. */ public static void main(String ar[]) { int a, b; String s; System.out.println("Please … | |
I am trying to make a histogram that represent the number of letter grades that are calculated. So the program reads in a csv file, pulls out the name, average grade and letter grade. From there it creates a histogram based on the letter Grades. Input: Alicia Marks,89,90,100,95,75,85,94,100,90,92 Bobby Ricks,98,79,87,79,9,98,7,19,98,78 … | |
if input is 0 150 17 the last number is 17 i need program that find how many 17 in 0 to 150? output should be 2 NOTE the program should run for any 3 input number | |
How to set that one panel contains three panels and each panels has buttons and textfield | |
Hi all, I have just finished with my tict-tac-toe program, and I thought I'd post it here if anybody fancy giving me any feedback. Also, I have a problem with printing the board, probably due to my lack of knowledge in using `printf` as opposed to `println`. Anyway this is … | |
I would like to know how to design a program(a) to run outside another program(b), that will click a button that comes up while using the program(b). Reason being, is the program that I am using constantly asks me to hit next after scanning a product, so I want to … | |
this is the problem code : import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.io.IOException; public class Prepared { public static void main(String[] args) { try { readerHelper r = readerHelper.GET_INSTANCE; System.out.print("enter username: "); String user = r.is().readLine(); System.out.print("enter password: "); String pass = r.is().readLine(); Connection con … | |
the following is taken from joshua bloch's effective java. pg 82: public class InstrumentedHashSet<E> extends HashSet<E> { // The number of attempted element insertions private int addCount = 0; public InstrumentedHashSet() { } public InstrumentedHashSet(int initCap, float loadFactor) { super(initCap, loadFactor); } @Override public boolean add(E e) { addCount++; return … | |
How to coding this? "fill the variabel with bufferedReader and for and will be stop if the variabel=="ZZ"" | |
You will need to check that the four parameters entered by the user are blank, so you will do the same as you did before but four times. To Identify if the User Presses <enter> You have written a JAVA program that creates a CD object with four instance variables, … | |
Hi friends, Can any one tell me the java program that how to convert Octa Decimal to HexaDecimal without using inbuild functions. I tried a lot but not successful. Please Please Please post the program... Thanks in advance.. | |
Hello Im using the FileUtils.copyDirectory method but it gives me the error of "Failed to list contents of foldername". I know the folder exists and I can write there because creating a file works. What could be wrong? | |
i am using xammp database. and i want to get last ID from my database so that i can insert new stuff in it. the code below doesnt get me the last it. its prints it is adding one next to last it. ex 7, 71, 711, 7111, 71111, but … | |
I am making an examination system desktop application in Java Swing. I have a frame named 'show_class_question' frame. This frame is used to display questions and four options from database. Whenever user clicks 'Next' button I am calling this same frame (show_class_question) again and agian from itself (self - refrencing) … | |
i have text field when i enter a value in it i want to retrive the values matching to the entred word from database and display those values in a pop up window am using jsp and struts oracle 10g database | |
|
The End.