32,199 Topics

Member Avatar for
Member Avatar for popeyemissy

I need to fix the code. Once a war event takes place, no points are assigned however in the next deal whoever wins (be it the player or computer) should get double points. One point for the war and the second point for the next deal that was won as …

Member Avatar for JamesCherrill
0
312
Member Avatar for nsharif

Hi, This is my first post, I usually find solution by searching this forums However, I been working on my problem for 6 hours with no solution. Here what I'm trying to do I have a class that extends as JPanle also it implements ActionListener I'm trying to add JScrollPane …

Member Avatar for dimasalang
0
170
Member Avatar for oneoderja

Define a class called ‘twoInt’ with two public integer fields a and b In the constructor of ‘twoInt’, initialize the a and b to be 1 and 2 Create an instance ‘mytwoInt’ in the main method Write a method ‘swap’ (not the method of the class ‘twoInt’) and pass the …

Member Avatar for oneoderja
0
159
Member Avatar for tammy12w

so lets say you finished your program. you made the GUI and it runs fine. so everytime you want to run your program you have to go to python(or what ever you use) lauch it to see your program. my question is what code or what do you have to …

Member Avatar for TrustyTony
0
161
Member Avatar for apot_abenojar

hi. i have some questions..howtowrite a program that convert numbers to their equivalent words? example. 123 become one hundred twenty-three in 3 different language.

Member Avatar for nsharif
0
185
Member Avatar for hwoarang69

hi, i need help with bubble sort. i am not sure what are variable j and variable sort are for? public static void bubble_sort(int unsorted[]) { int i = 0; int j = 0; int sort = 0; while(sort == 0) { sort = 1; j++; for(i = 0; i …

Member Avatar for hwoarang69
0
189
Member Avatar for adityawkhare

Ok so i made a game in which a random no. is generated and user have to guess it. The game givesclues like Higher or Lower to user. When a guessed no is found a new jframe opens in a new class gui.class. Now i want to pass the argumets …

Member Avatar for NormR1
0
189
Member Avatar for TheHealer

Trying to write a for loop to insert buttons into the array. This is the code to create an array that can hold 7 values: JButton[] buttons = new JButton[7]; String[] buttonText = {"Circle", "Square", "Oval", "Smiley", "Swirl", "Start", "Stop"}; This is the for loop I'm not sure about to …

Member Avatar for NormR1
0
3K
Member Avatar for TheHealer

Trying to change the size of the shapes over time. Making them bigger as they move upwards and to the right, and making them smaller as they move downwards and to the left. This is the class that contains the move method: import java.awt.*; import javax.swing.*; import java.util.Random; public class …

Member Avatar for NormR1
0
1K
Member Avatar for Web_Sailor

Hi :-/ I have a java function that I want to call inside my JSP page. My function has got parameters.Now the problem is I cannot call it using JavaScript and if I put it inside <% %> tags it just executes while loading the webpage itself. I need to …

Member Avatar for hessah1986
0
201
Member Avatar for summey

Bellow is what i have so far on my assignment. I need some help getting this application working. Thank you for your time! /** General Assignment: Review the grading policy on the CSCI 181 syllabus. The course grade is determined by the weighted average of six components with two possible …

Member Avatar for NormR1
0
229
Member Avatar for Dane2259

Could someone please give me an idea of why I get a nullPointerException when I run this method in my main program. Every list has a variable, first, to store the address of the first node of the list. I assign current1 to the first node of list1 as a …

Member Avatar for NormR1
0
196
Member Avatar for Hemanth.Satkuri

String testHTMLContent = testhtml+productlogo; Message message = new MimeMessage(session); message.setFrom(new InternetAddress(usern)); message.setRecipients(Message.RecipientType.TO,InternetAddress.parse(to)); message.setRecipients(Message.RecipientType.CC,InternetAddress.parse(ccaddr)); message.setSubject(sub); //message.setText(body); // setDebugMsg("Attempting to send..."); Transport transport = session.getTransport("smtps"); MimeMultipart mimeMultipart = new MimeMultipart(); MimeBodyPart msgContent = new MimeBodyPart(); msgContent.setContent(testcontent, "text/plain"); mimeMultipart.addBodyPart(msgContent); MimeBodyPart query = new MimeBodyPart(); query.setHeader("Content-Type", "text/plain"); query.setContent(queryString, "text/plain"); mimeMultipart.addBodyPart(query); MimeBodyPart htmlPart = new …

Member Avatar for Hemanth.Satkuri
0
128
Member Avatar for rammiesteyn

Hi there, What i'm trying to accomplish is: These two methods: f(x : double) : double post: return x integral(og : double, bg : double, step : double) : double post : return (f(og) + f(og+stap) + … + f(bg)) * step So I can call those two in my …

Member Avatar for rammiesteyn
0
261
Member Avatar for sharonC

I have an interesting problem. I am working on a method that iterates through a number of simple java arrays stored in an Object array. The goal of this method is to find the smallest array contained within the Object array. Because these collections are stored in an Object array, …

Member Avatar for NormR1
0
217
Member Avatar for Rohan.India

I am working on a program where I am trying to solve a tree structure using the Node function I have to perfomr a arithmetic operation example ((1+2)*3) using a tree structure with left and right child. the complexity being I need to randomly generate the constants as well as …

Member Avatar for JamesCherrill
0
103
Member Avatar for jaydac12

HI ! could you please help me here? i'm having a problem on marking the books in my library program if it is borrowed or returned? here's where im at, import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.util.*; import java.awt.Color; public class Library { ArrayList<String> bookName = new ArrayList<String>(); {{ …

Member Avatar for jaydac12
0
690
Member Avatar for rahul.ch

public class Thread7 implements Runnable { public static void main(String r[]) { Thread t = new Thread(new Thread7()); t.start(); public void run() { System.out.println("C"); System.out.println("D"); } System.out.println("A"); try { t.join(); System.out.println("B"); } catch(Exception e){} } } Query1: On compiling this program I get "illegal start of expression" error pointing to …

Member Avatar for delta_frost
0
272
Member Avatar for RozenKristal

THing is I have an assignment where the object is an array, I need to check when it is out of bound. But I dont understand what this statement means? Can you guys help me verify it? > method "private void rangeCheck(int index)": if the value of index is less …

Member Avatar for jamesmadison43
0
179
Member Avatar for alex.ametrano

I am having a problem completing this Java program. Basically everything is complete and running correctly except the end (which I cannot figure out the code for). The point of this program is to convert dates from the "Month Day, Year" format to "DD-Mon-YYYY" format and increment the dates by …

Member Avatar for NormR1
0
289
Member Avatar for Kathy0410

Hello everyone. I have this program to write for my college course. I listed the instructions below. The problem I have is the starting point. I don't know where to begin. Would it make sense to have a class called Sports, class called mySports, and then classes such as Basketball..etc …

Member Avatar for JamesCherrill
0
180
Member Avatar for zeroliken

I got the insert and Delete Data/Row working for my DBMS. The deleteRow method finds the row that contains the same primary key from the database, passed on to the method, and deletes the row. With using the insertRow method, the data I added shows on up on the last …

Member Avatar for Taywin
0
265
Member Avatar for Dizzy Noob

hello everyone, Ive been trying to alter strings and i am having a very difficult time altering the vlaue after i split them. i understand what i am doing when i split the input(String[] word = phrase.split(" ");), thanks to this site.. and how i am then able to alter …

Member Avatar for Dizzy Noob
0
278
Member Avatar for riahc3
Member Avatar for pritaeas
0
63
Member Avatar for crownedzero

I'm attempting to use the ObjectOutput/InputStream to write data to a file; I'm fairly certain I've got the out portion but coming back in isnt working as it should, thoughts? public static void writePersistant(ArrayList<PersistantObject> persistantRecords) { try { ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream("dataout/population-record.ser")); for (PersistantObject i : persistantRecords) { …

Member Avatar for JamesCherrill
0
189
Member Avatar for yoganath

college academic controlling all departments i want new ideas to this project in java.

Member Avatar for Taywin
0
95
Member Avatar for FUTURECompEng

I am trying to create a simple AI (for four in a line). I have looked online and found a few complicated AI's but they were to complex for me. I am trying to use recursion and maxDepth to create an AI to play two moves ahead. public class AIMove …

Member Avatar for Taywin
0
262
Member Avatar for plasticfood

So i have a class that takes 2 generics types: public class Something<K,V>.... In another class, i'm trying to create an array of Something objects. how do i do this? i'm getting an error with this: Something <K,V>[] s = (K,V[]) new Object[size];

Member Avatar for plasticfood
0
215
Member Avatar for london-G

Hello, I would like to retieve data into my combobox. I have done this so far but when I click on the button it's not giving me anything: public void displayItem(int data1) { String sql = ("select * from Students limit ?,1"); try { st = (PreparedStatement) con.prepareStatement(sql); st.setInt(1, data1); …

Member Avatar for london-G
0
270
Member Avatar for aabbccbryanmark

This is the error i get.. Enter employee name: Bryan Enter employee's salary: 123 Enter employee name: Mark Enter employee's salary: 456 Enter employee name: Fajutag Enter employee's salary: 789 Enter employee name: qwe Enter employee's salary: 32 Enter employee name: qew Enter employee's salary: 312 Enter employee name: qew …

Member Avatar for stultuske
0
428

The End.