31,001 Topics

Member Avatar for
Member Avatar for collin_ola

Hi! So yesterday when trying to run a program that previously ran perfectly, I received the error shown in the title and I've no idea why. Nothing that could have caused such error was changed, so I've absolutely no idea what the problem could be. Here's the code the error …

Member Avatar for stultuske
0
2K
Member Avatar for Rachy3091

Hi I'm new to this forum and to java, I have some work to do which requires that I have to write a program that reads in a list of whole numbers and that only even numbers in the range 1-100 are accepted and both 'N' and 'n' terminate the …

Member Avatar for stultuske
0
140
Member Avatar for Fayzan

Hi every one, i have been given an assignment, and i need your help in making the programme. The question is Write a program to simulate a lottery game where a set of the lottery numbers includes 6 different numbers from 1 to 49. A possible run may look e …

Member Avatar for JerrimePatient
0
217
Member Avatar for Bharti_1

I am trying to implement meeting scheduling algorithm. I want to randomly generate meetings and store it in a file. Then read this file in another code, create different agents who will try to schedule these meetings. My input meeting file is as follows: 1 20 25 [1 2 3 …

Member Avatar for Bharti_1
0
379
Member Avatar for Pobunjenik

Hi, so I've got this multithreaded server which correctly waits for clients and assigns them to a worker thread. From there, the client is sent an object `Packet` which contains variables `Player` and `Round` (simplified, it contains more data but these are the most important). I'm building a simple top …

Member Avatar for JamesCherrill
0
428
Member Avatar for erdie213

write a java program that reads integers only from a text file"myData.txt", square the integers and then ends the result to an output file "output.txt".the program should be able to skip text characters in the file and square only integers

Member Avatar for stultuske
-2
91
Member Avatar for shahera.arafat

hello everybody ^^ I have to make a calander ,and to let the user to insert any event ! the calander it self is working <<but I don't know how can I write the code to give the user the ability to enter a new event by entering some fields …

Member Avatar for shahera.arafat
0
131
Member Avatar for pars99

I have to draw an image using Graphics and Graphics2D. The image is Monstercat How would you guys suggest I do the parts that have several curves to them? Do I use multiple QuadCurve2D or is there a way to do it in one method? ![monstercat_logo_vector_by_lmw_ybc-d63hlvv.png](/attachments/large/4/d4b5cb7925e7eff4a402233b59be737f.png "align-center") On a side …

Member Avatar for JamesCherrill
0
218
Member Avatar for sirlink99

Hello Everyone. I am wondering if anyone has any experience working with Korean characters. I attempted to find out how to split them up, but I have had no success thus far. What I was thinking is having a character like "안" and having it split up into "ㅇ", "ㅏ"and …

Member Avatar for sirlink99
0
383
Member Avatar for bananacat

Hi. I'm using 3 classes: the Character class, the Scanner class, and the Test class. This is the Character class: public class Character { private char cargo = '\u0007'; private String sourceText = ""; private int sourceIndex = 0; private int lineIndex = 0; private int columnIndex = 0; public …

Member Avatar for rproffitt
0
346
Member Avatar for divinity02

hi everyone i am building this java command line game. it is called counting numbers game. here is the detail descripbing of the game This game consists of 10 questions which are broken down into 3 game rounds. See below for rules regarding the game rounds: Round 1 This round …

Member Avatar for rubberman
0
222
Member Avatar for kxjakkk

I'm attempting to make a small program that when a user inputs a string, it counts all the letters. Here's what I've got so far: import java.util.Map; import java.util.HashMap; import java.util.Set; import java.util.TreeSet; import java.util.Scanner; public class LetterTypeCount { public static void main(String[] args) { // create HashMap to store …

Member Avatar for JamesCherrill
0
308
Member Avatar for Pobunjenik

So I'm building this pretty simple top trumps card game as part of an assignment. I have the game logic built, the swing GUI is in place and I plan to do all the calculation on the server app and have it update the client up with the game's state, …

Member Avatar for Pobunjenik
0
685
Member Avatar for Melissa_2

I am working on an assignment for my object oriented programming class, it is a very simple program, but it has raised a question. My assignment is to create a rectangle class where I just assign points. The thing is we write our programs with notepad and run them through …

Member Avatar for JamesCherrill
0
158
Member Avatar for PatrikIden

Hello i have this codes to try to get this working. But when on ./index.html all the li are given a class of current_yes exept for the ./clients.html link. And the other way aroud if i go to Clinets/clients.html then all li exept ./index.html are given a class of current_yes. …

Member Avatar for PatrikIden
0
316
Member Avatar for Goldfinch

** I was building a program that is supposed to paint an image in a JPanel. I should be able to select an image (such as a JPEG) from the Open item in the File drop down menu and then it should be visible in a new window. However, the …

Member Avatar for Goldfinch
0
197
Member Avatar for london-G

Hi! Basically I am trying to add the graph inside the Jpanel which already exists. I am getting the erorr "adding a window to a container" Here is my code public void displayGraph(){ try{ String sql = "Select pressure, ventilage from statstbl"; DBCon conn = new DBCon(); JDBCCategoryDataset dataset = …

Member Avatar for JamesCherrill
0
337
Member Avatar for Nuruhee

import java.util.*; import Jama.Matrix; import java.util.*; import Jama.Matrix; public class Suceses { public static void main(String[] args) { System.out.println("회전할 각도를 입력하시오 :"); Scanner a = new Scanner(System.in); int kakdo = a.nextInt(); System.out.println(a); double rad = (kakdo*Math.PI)/180; int x= 50; int y= 30; Matrix A = new Matrix(new double[][] { {Math.cos(rad),Math.sin(rad)}, …

Member Avatar for Markland
0
385
Member Avatar for moe11223

I am new to OOP, i am not sure if this is the correct approach or not. Need some insight. Assignment 3 Write a class named CreditCard that has (at least) the following member variables: name. A String that holds the card holder’s name. cardNumber. A field that holds the …

Member Avatar for stultuske
0
4K
Member Avatar for Wing_1

Implementation of ADT Tree (array) to perform the following operations on an ordered general tree a. create a tree (which is initially empty) ... max of 2 levels only b. leftmost child (n, T) - returns the leftmost node in the tree T c. right_sibling(n,T) - returns the right sibling …

Member Avatar for rubberman
0
112
Member Avatar for AndroidUser

When launching exe file, I am getting the following error, 'The registry refers to a nonexistent Java Runtime Environment installation or the runtime is corrupted. The system cannot find the path specified'. No issues with Environment settings. Can you please help on this. This is really very urgent issue. Kindly …

Member Avatar for AndroidUser
0
1K
Member Avatar for kxjakkk

I'm trying to make a program that removes all occurences of a specified string from a text file. I'm having trouble with tying in everything to make it work, so that the user is prompted to enter a string. This is what I've got: import java.awt.BorderLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; …

Member Avatar for JamesCherrill
0
454
Member Avatar for scheppy

Ive made a java program to do automated tasks for a game. It takes screen shots with java.robot every 250 milliseconds. The program is working great, but it will always crash at around the 30min mark Im running this program on my mac, and this is the crash report that …

Member Avatar for scheppy
0
949
Member Avatar for collin_ola

Hey! Firstly, here's the code: for (Row row : sheetToSearch) { for (Cell cell : row) { if(cell.toString().equals("Oladimeji")){ System.out.println("Found Oladimeji!!"); break; } else { System.out.println("Oladimeji not found...."); } } } What this does is search through the an excel spreadsheet, looking for a name (which happens to be my surname!). …

Member Avatar for rubberman
0
138
Member Avatar for collin_ola

Hey, I am trying to make use of the apache POI in my Java project in Eclipse. I previously tried using jxl but what I wanted to do didn't seem so simple with it. With jxl, all I had to do was import a jar. I don't seem to be …

Member Avatar for collin_ola
0
310
Member Avatar for seanj1992

hi everyone, i am doing a pizza ordering Gui. i am stuck on 2 things, i am trying to get the receipt string to store the items that are checked. they are multiplying when they are displaying. the second is displaying the string in the jtext area, any help woud …

Member Avatar for Traevel
0
180
Member Avatar for sahar.97

I want to rotate k top element of array for example: k = 2 array before rotate --> 3 , 4 , 2 array after rotate ---> 3 , 2 , 4 int[] temp = new int[k]; for (int i = 0; i < k; i++) { if(this.stack[i]!= null){ temp[i] …

Member Avatar for stultuske
0
230
Member Avatar for anandhachandru

This my code someone say were i missed it OAuthRsaSha1Signer rsaSigner = new OAuthRsaSha1Signer(); com.google.gdata.client.authn.oauth.OAuthParameters params = new com.google.gdata.client.authn.oauth.OAuthParameters(); params.setOAuthConsumerKey(oauthconsumerkey); params.setOAuthNonce(Util.getNonce()); params.setOAuthTimestamp(Util.getTimestamp()); params.setOAuthSignatureMethod("RSA-SHA1"); params.setOAuthType(com.google.gdata.client.authn.oauth.OAuthParameters.OAuthType.TWO_LEGGED_OAUTH); params.addCustomBaseParameter("oauth_version", "1.0"); rsaSigner.setPrivateKey(privKey); String method = "GET"; if (body != null && body.length() > 0) { method = "POST"; MessageDigest digest = MessageDigest.getInstance("SHA-1"); digest.reset(); byte[] hash …

Member Avatar for Ewald Horn
0
330
Member Avatar for Kelly_4

Hi we need someone to help us with a project that involves creating a twitter bot that will take lists of common unigrams and bigrams along with a list of rgb codes with colour names and will use these lists to create new colour names and post these on twitter. …

Member Avatar for Schol-R-LEA
0
138
Member Avatar for Shushan_1

Hello Friends. I am working in a Java assignment and I am seriously in need of a help. Since I am new to programming, I need an assist. The program which I have to do has the following specifications: Scanners should be used compalsarily The green grocer has asked you …

Member Avatar for JerrimePatient
0
3K

The End.