35,618 Topics

Member Avatar for
Member Avatar for gomonkeyninja

Okay, so this is my final assignment for a class I am taking. I'm making a Book Library Database that keeps track of all books that are entered and changed, things like that. I figured a useful feature would be saving your data in a text file so that it …

Member Avatar for gomonkeyninja
0
350
Member Avatar for GeekTool

I am trying to choose a string out of 4 strings randomly, and to show this string on the console. How can i do it ? For example, there is a question, if user answers it correctly, then the console will display one of the strings that i chose. I …

Member Avatar for GeekTool
0
208
Member Avatar for GeekTool

Hello, i want to write a program that will help an elementary school student to lean multiplication. For this, i use random object to produce two new positive one-digit integers. For this, i have coded this, but then got confused of the scope issue. Here is the code so far: …

Member Avatar for NormR1
0
158
Member Avatar for blackmagic01021

hello, I have a JAVA application for active MQ message receiving.It is based on a observer pattern. When I receive a non persistant message at my on Message functionality, it receives the same message nearly 7 times. I have a GUI where I put the messages. But as the receive …

Member Avatar for JamesCherrill
0
124
Member Avatar for kunaldinde
Member Avatar for Kert

I have 3 very simple classes and a question about their inheritance. public class A { int a; A(int a){ this.a = a; } void meetoda(){ System.out.println("a = " + a); } @Override public String toString() { return "A [a=" + a + "]"; } } public class B extends …

Member Avatar for delta_frost
0
116
Member Avatar for Ritesh_4

hello, is there currently a tool which can convert C# codes to Java (for example to be used in NetBeans)?

Member Avatar for Ritesh_4
0
403
Member Avatar for salmanomayer

Hello All, I'm facing a problem while trying to connect a SIM based modem with laptop USB port by using java. every process is almost done for how to connect. But when I'm running the application its showing the following eror msg. # A fatal error has been detected by …

0
67
Member Avatar for steven447

I use a parser called jsoup to parse html amd store it in a mysql database. The parser reads the files with an input stream. The problam is that some class en id atributes are given with class="". The parser cant find those atributes and returns a blank string. I …

Member Avatar for Shinedevil
0
156
Member Avatar for s0urce

Been working on this for so long I am lost and my mind is mush,lol. On line 106 i have this error (class camera is public, should be declared in a file named `camera.java`) I have a lot of incompatible types required: `java.lang.String found: camera.camera.string errors`. I do not know …

Member Avatar for s0urce
0
202
Member Avatar for newbie14

We have a socket connection which receive data from gps devices. The problem now is that we find some of the data coming is corrupted and therefore it disconnect the socket. The issue here we have checked the device logs files all looks fine. The engineer have implemented in C# …

0
90
Member Avatar for jonny93

Hello again. I am trying to create a simple code that can compute the average of a set of numbers read in using a scanner. import java.util.Scanner; public class Average { public static void main(String[] args) { double number = 0; double total = 0; int count = 0; Scanner …

Member Avatar for delta_frost
0
264
Member Avatar for kyriacos1986

I have created my GUI interface in Java and I would like to know how to add information from a pdf file. I would appreciate any help. Thank you in advance

Member Avatar for NormR1
0
55
Member Avatar for GeekTool
Member Avatar for StormHawk

I am trying to implement the following method: public void add (String a, b, c, d, e, f,...z) { ... } However, I get a compile time error... What am I doing wrong with this? (The parameter takes 26 strings).

Member Avatar for delta_frost
0
311
Member Avatar for vinithktp

Hi All, I am facing an issue with apostrophe. Please look in to my code [CODE]String ss1="St: Mary's School."; out.println("<input type='text' name='shipTest' value='"+ ss1 +"'>");[/CODE] Output: St: Mary Not able to display letters after the apostrophe. Kindly help me to resolve this issue. Thanks in advance -- Vinith

Member Avatar for Manoj Phutela
0
899
Member Avatar for Valiantangel

In my Class IntegerSet i hav declared the below method but its not printing when i ran the test public static IntegerSet union(IntegerSet setA, IntegerSet setB){ IntegerSet u = new IntegerSet(); for (int i=0;i <= CAPACITY; i++) if (a[i]==true || setB.a[i]==true) u.a[i]=true; return u; In Testing in main, `System.out.println("The union …

Member Avatar for JamesCherrill
0
133
Member Avatar for jwings

I have problems with my GUI part... I have put all components on the JFrame but I would like to add some backgrounds and decoration. However, when I add background using JLabel. Everything loses its position and they are all ruined... Is there anyway to resolve this?

Member Avatar for JamesCherrill
0
643
Member Avatar for MadJako

Hi super cool experts! Big Java noobie here and first time poster, so sorry in advance if this forum isn't for people like me. I'm trying to write a silly math program as my first user input test, but I seem to be getting error with the variables from the …

Member Avatar for MadJako
0
616
Member Avatar for 47pirates

I need to update the items of JCombobox from the database during runtime. I had made the JCombobox editable and what i need to do is type something in the editable combobox and search the database and only display the items matching the text. For example there are if i …

Member Avatar for JamesCherrill
0
2K
Member Avatar for Valiantangel

I am getting the following error,"The static field IntegerSet.a should be accessed in a static way" `public static IntegerSet union(IntegerSet setA, IntegerSet setB){ IntegerSet u = new IntegerSet(); for (int i=0;i <= CAPACITY; i++) if (a[i]==true || setB.a[i]==true)// u.a[i]=true; return u; My Class is as followed: public class IntegerSet { …

Member Avatar for JamesCherrill
0
369
Member Avatar for joe_ojah

hi everyone, i am new to netbeans. i am creating a system that can allocate rooms to students. My main problem is how to find out which rooms are full and which ones are available. I am using Mysql and Java Netbeans. I have read some of the tutorials but …

Member Avatar for ali.nazia999
0
2K
Member Avatar for BestJewSinceJC

Since I keep seeing people asking how to read the Integers from a File, I figured this simple snippet might be useful. What it does is it creates a new Scanner Object based on the File Object "test.txt" then it reads all of the Integers from that file, skipping over …

Member Avatar for Ezzaral
0
5K
Member Avatar for Jdan2388

Hi, Im really new to java and i'm trying to write a simple rock paper scissors game, and i'm having a problem. I have to incorporate a JOptionPane three button box where the user selects either rock, paper or scissors. The problem is that i don't think im retrieving the …

Member Avatar for Jaggs
0
880
Member Avatar for GeekTool

In the book i use, a craps game is the project. Here is the code: import java.util.Random; public class Craps { private static final Random randomNumbers = new Random(); private enum Status { COUNTINUE, WIN, LOST }; private static final int SNAKE_EYES = 2; private static final int TREY = …

Member Avatar for ~s.o.s~
0
3K
Member Avatar for baseballer

Hi, I need some help coming up with an algorithm that will return class 1, 2, or 3 based on the year that is entered. I have an example that works but I need something a little more simple. `function senateclass (cycle) { return 3 - ((cycle % 6) % …

Member Avatar for baseballer
0
119
Member Avatar for xGiraffe

I have trouble trying to create a clock java program that asks for user's input for hours and minutes. When it asks the user for their input, the clock program is suppose to set it to that time using the hour hand and the minute hand, but for some reason …

Member Avatar for JamesCherrill
0
433
Member Avatar for SuperManofBC

Simple Sound Player Goal The goal of this assignment is to implement a simple sound player. The application has been partially implemented, and you need to complete the missing bits. When you open the project, you will see the class structure depicted below. Three of the classes are fully implemented …

Member Avatar for stultuske
0
642
Member Avatar for gispe

Hi, Im trying to insert to a table in sql that is related to another by a foreign key. The first table has an ID, a suppliers id and a date; and the other table has an ID (that for some records should have the same id from the other …

0
126
Member Avatar for rtellez700

I was wondering if it is possible to export a project in eclipse as a jar file but that doesnt include the .java source code files. For example, say i wanted to distribute my program to others but didnt want them to be able to alter my .java source codes. …

Member Avatar for JamesCherrill
0
269

The End.