32,204 Topics

Member Avatar for
Member Avatar for saveme123

How do you write a method that switch a space " _ " with a letter, the example my teacher gave us to work with is: [CODE]public static int seqSwapSearch ( int[] list, int item) { int location = -1; int temp; for (int i = 0; i < list.length; …

Member Avatar for code learner
0
89
Member Avatar for Sonny101

Hi all, I am currently attempting my first project for programming using Java. One of the classes I have made contains 3 constructors, now I remember learning a little about the [I]this[/I] keyword and thought it may be appropriate here, however, I am not completely sure on how to use …

Member Avatar for lisaroy1
0
125
Member Avatar for Latvija13

I don't understand how to check for non-alpha characters in a string that has more than one word. I'm basically asking for a retype if the string has more than 3 words or if it has non-alpha characters. I'm wondering if Character.isLetter is not what I'm looking for since it …

Member Avatar for JamesCherrill
0
122
Member Avatar for ubi_ct83

hi, lets say i have 2 classes 1 is to process the data and another 1 is to connect to mysql. P.java to process the data and Connection.java to connect to mysql.i use JDBC to connect and pass the data through constructor P way=new P(String side).after process the data, i …

Member Avatar for ubi_ct83
0
101
Member Avatar for reyarita

ALGORITHM TO LOAD A JOB IN A FIXED PARTITION 1. Determine job's requested memory size 2. If job_size > size of largest partition Then reject the job print appropriate message to operator go to step 1 to handle next job in line else continue with step 3 3. Set counter …

0
79
Member Avatar for ubi_ct83

hi and good day to all, i have a problem with my data from the mysql. i have string data from the db and want to process in program(java app),but no out appeared.i suspect something is wrong with the input because, there is no problem if i run with direct …

Member Avatar for ubi_ct83
0
164
Member Avatar for Lxyslckr

I'm trying to do four operations. Find the minimum including 0 # (working on) find the sum of the negative # (Think I'm done) Find the sum of the odd # (working on) How many positive #(working on) I need help on the sum of negative This is what will …

Member Avatar for Lxyslckr
0
91
Member Avatar for javanoob101

Hello! I need to get some collision detection going in my code but I have no idea where to start! can anybody find out how to put this in? the detection will stop drwaing monstors if the bullet hits them [code] // The "SpaceShooter" class. //import java.applet.*; import java.applet.Applet; import …

Member Avatar for javanoob101
0
365
Member Avatar for nocookies92

Recently, i found a book online that walks you through various elements of java game creation. The code from the book uses the java3D timer, so to compile the example programs, I had to download and install java3D. At Oracle's site, I selected WindowsXP as my OS and downloaded the …

Member Avatar for nocookies92
0
394
Member Avatar for nambiajith

i am doing project bandwidth efficient video simulation in java. I set class path in jdk set classpath=%classpath%;.\\lib\\gif4j_pro_trial_2.3.jar; [Ljava.lang.String;@15151aa Exception in thread "AWT-EventQueue-0" java.lang.Error: Unresolved compilation p roblems: The import javax.media cannot be resolved The import javax.media cannot be resolved The import javax.media cannot be resolved The import javax.media cannot …

Member Avatar for peter_budo
0
573
Member Avatar for theurbanist

Hello everyone, I'm trying to create a diagram of numbers as represented by asterisks. I'm taking an integer and turning it into a string of *. For example, for the value of 4, it'd be ****. For the value of 7, it'd be *******. Does anyone know of a way …

Member Avatar for JamesCherrill
0
114
Member Avatar for Amoryethel

I'm creating a program that adds fractions together. That being said however, my program does not seem to be responding correctly. Everytime I run the client code, it outputs 18, when I want it to add 2/6 and 1/6. [CODE] // Constructor // public class RationalNumber { int num; int …

Member Avatar for JamesCherrill
0
156
Member Avatar for Amoryethel

I'm in the works of creating a program that dishes out basic arithmetics with fractions, i.e., add, subtract. However, I found myself stumped over this error. [QUOTE]Test.java:18: 'void' type not allowed here System.out.println(r1.add(r2)); ^ 1 error[/QUOTE] My code is as follows: [CODE] \\ The constructor \\ public class RationalNumber { …

Member Avatar for Amoryethel
0
6K
Member Avatar for zakris

Hello! I am a student and i have this assignment to do! I must create in Java a phone! Not a "working" phone just how it looks (sort of!!) I start it today and i have a few questions! I didnt do anything extraordinary, just create the outside and inside …

Member Avatar for zakris
0
844
Member Avatar for wailoon88

[CODE]import net.htmlparser.jericho.*;[/CODE] hi i got this error when using the above library. it says " package net.htmlparser.jericho" does not exist" any help is deeply appreciated ^^ :-/

Member Avatar for wailoon88
0
79
Member Avatar for Ipan88

Hello. I am trying the last few days to make a text editor in Java but as I am new to the language I have some problems that I don't know how to deal with. The first one is that I want to save my text and then open it …

Member Avatar for Ipan88
0
151
Member Avatar for marine22
Member Avatar for almefab

Hi all, i have a variable in a JFRAME that i need to use in a JPANEL. How can i do that. Example: MainProgram that launches Java Application. Window1 that is a JFRAME Window2 that is a JPANEL In Window1 I have a variable declared example int X = 0; …

Member Avatar for almefab
0
971
Member Avatar for jackabascal

I actually do not program in Java, I'm more of a C# and C++ person myself. But i do have a question regarding executable jar files. I have an executable .jar file that I would like to run, however can not. A console keeps flashing on the screen and dissapearing, …

Member Avatar for masijade
0
146
Member Avatar for Gsterminator

How do i call back a variable in void method into the main method?? [CODE]public void multiply (int x) { Vector3 v3 = new Vector3(num1*x,num2*x,num3*x); }[/CODE]

Member Avatar for Gsterminator
0
170
Member Avatar for vigneswaranm

Hi guys..., I want to know howmany devices connected with server..,And I want to find it by java code..Can you please help me to write a code for the same.

0
46
Member Avatar for lashbandi

this was the instructions... "Write a short Java program that takes two arrays a and b of length n storing int values, and return the dot product of a and b. That is, it returns an array c of length n such that c[i] = a[i] . b[i], for i …

Member Avatar for DarkLightning7
0
765
Member Avatar for lauzza.vauzza

Hey need to create tic tac toe but which reads from tester file - after the right direction to go from here, on how to implement it [CODE]import java.util.*; public class TicTacToe { public TicTacToe() { Scanner input = new Scanner(System.in); char[][] board = new char[3][3]; // Sets up game …

Member Avatar for DarkLightning7
0
158
Member Avatar for rusl07cl08

These are the problems: Ground Beef Value Calculator Different packages of ground beef have different percentages of fat and different costs per pound. Write a program that asks the user for: 1. The price per pound of package "A" 2. The percent lean in package "A" 3. The price per …

Member Avatar for DarkLightning7
0
2K
Member Avatar for simpleonline123

Need help with logging into a particular website using the GetElementby command As far as the username/password it seems to be working find but there isn't an ID or Tag for me to use in my script to click on this particular button called "submit". Looks like the page is …

0
64
Member Avatar for saveme123

I need help with my code for computers, our final assignment is to make a simple game, so I decided to do Hangman. This assignment is worth 20% of my final mark due on Monday so if anybody could help me with it I would really appreciate it. (I'm still …

Member Avatar for saveme123
0
200
Member Avatar for Sonny101

Hi, Sorry for my ignorance but the problem I have is probably so simple that I cannot seem to find an answer for it. I am just learning about the Java.Util Package but in following my course module I am getting an error. here is the simple code : [CODE]import …

Member Avatar for Sonny101
0
136
Member Avatar for LianaN

Hi! I would like to create a button for deleting all JLabel components on JDesktopPane. My code is shown below. The error message is shown below the code. For instance, let's say there are 3 JLabel components (the 4th is not JLabel). In this case, only 2 of 3 JLabel …

Member Avatar for LianaN
0
129
Member Avatar for muloki

I'm writing an application using jdbc connection to access and want display a sql query using the number of rows found to declare an array of JTextFields. Not only does nothing display but also getting an Error: java.lang.ArrayIndexOutOfBoundsException: 00. Can anyone help please. [CODE] private void selItActionPerformed(java.awt.event.ActionEvent evt) { // …

Member Avatar for vealparry
0
175
Member Avatar for curbster

Hi, I'm in my first Java class and I am working on a problem that I could solve if I just figure out how to convert a char to an int. i.e. convert A to its letter equivalent with a function like this: [CODE] intLetter = charLetter.parseInt(); [/CODE] am I …

Member Avatar for curbster
0
1K

The End.