35,618 Topics

Member Avatar for
Member Avatar for NewtoC++

Sorry if this is posted in the wrong section. But I came across this question on a test: Which of the following will evaluate to true only if boolean expressions A, B, and C are all false? (a) !A && !(B && !C) (b) !A || !B || !C (c) …

Member Avatar for hanvyj
0
116
Member Avatar for ChrisHunter

Hi my problem is that i'm making a mobile app and i need to seperate the following string: ChrisHunter21 into: Chris Hunter 21 What is the easiest way to do this in J2ME ? i had a look at the Ostermiller one but didnt understand it. Thanks Chris

Member Avatar for peter_budo
0
218
Member Avatar for TinyBelly

I've tried many time to solve this problem...but still not successful, I'm newbie..so anyone of guys can help me check this problem... [LIST] [*]Button "Back" is big as frame [*]Seems no TextField for NoOfTicket [/LIST] [CODE]import javax.swing.*; import java.awt.*; //import java.awt.event.*; public class ticketReservation extends JFrame { private JLabel jlbWelcome, …

Member Avatar for TinyBelly
0
172
Member Avatar for eikal

Hello, i have a class "Die" and a class "PairOfDice" pair of dice extends die. i need to instance variables of type die in pairofdice constructor... i think. here are constructors for die and pairofdie.. we learned all of this earlier this semester but apparently i didn't learn it well …

Member Avatar for JamesCherrill
0
155
Member Avatar for chudapati09

Edit: Never mind I figured it out. I used Math.pow(base, exponent) to figure it out I'm creating a calculator and I can figure out how to the power of two doubles. This is what I have: [CODE] public Power(Double base, Double exponent) { result = base ^ exponent; //result is …

0
68
Member Avatar for mjavaid

I know this is a very common program that has been discussed, and I have searched through all the previous posts about it but still having problems. It's a program for an airline seating reservation. Consists of 12 seats total, 1-4 is First Class, and 5-12 is Economy. I have …

Member Avatar for hanvyj
0
282
Member Avatar for 24x24

My assignment: develop a limited application to track the statistics of sports players. For each player, track first and last name, points scored, assists made, and penalty rate. Design and implement an object capable of recording this info. Implement this object as Player. Must allow user to enter new player …

Member Avatar for yancouto
0
224
Member Avatar for blackhook

i have an error of line 40 illegal start of expression and line 73 class interface,or enum expected. im making a 10 random numbers display them determine the largest and the smallest number of 10 random numbers thanks.. [CODE]import java.util.Random; /** Generate random integers in a certain range. */ public …

Member Avatar for peter_budo
0
125
Member Avatar for CorruptionInc

I have to create a Pizza GUI that shows pizza size choices and topping choices for pepperoni and mushrooms and then calculate the total. I'm having trouble constructing the GUI. Down in the createCenterPanel method Eclipse is tell me that radioButtonPanel, checkBoxPanel, and pricePanel cannot be resolved to a type. …

Member Avatar for CorruptionInc
0
5K
Member Avatar for I<LateNupurGuha

[B][COLOR="Red"]final[/COLOR][/B] members are used to specify that it can not be [I]revalued[/I] or [I]overriden[/I]. :icon_lol: [U]Explain [B]logically,[/B] [I]why[/I][/U] a [B][COLOR="Green"]static[/COLOR][/B] method can not [B][I]override[/I][/B] comparing it with an [I]instance method[/I]. May a [B][COLOR="Green"]static[/COLOR][/B] variable be [B][I]revalued[/I][/B]? :icon_exclaim: If, [B][COLOR="Green"]static[/COLOR][/B] also serves the same purpose at this point as [B][COLOR="Red"]final[/COLOR][/B], then …

Member Avatar for jon.kiparsky
0
90
Member Avatar for bhanu1607

Hi , I have a problem. I am inserting 5 rows into a table. Before inserting i disabled the auto commit(conn.setAutoCommit(false)). And after i have not at all commited the transaction. And i used rollback for every exception in catch block. But, The transactions are saving up to the exception. …

Member Avatar for mKorbel
0
94
Member Avatar for Taimoor Rana

Hello, I'm currently looking for a book the covers "how to develop a game". I have basic knowledge of Java. I know: arrays,classes,GUI,basic animation with Timer class,basic graphic. I want to move on and start learning threads, collitions, keyboards and mouselistener and all other game related topic... I was wondering …

Member Avatar for Taimoor Rana
0
176
Member Avatar for Gaspacho

Hello I have Java application that runs under unix and has console for user imput. I would like to perform something like this - If I enter "edit config" I would like to vi pop up with config file loaded (with java still running in background" and after user is …

Member Avatar for Gaspacho
0
191
Member Avatar for pooran.c

code above would print first month correct. but from the second month days or not in order.[code]import java.io.*; public class calendertest { public static void main(String[] args) { int months=12; int days=0; int i=0; for(months=1;months<=12;months++) { System.out.println("----------------------"); if(months%2==1) { for(days=0;days<=31;days++) { if (days%7==1) System.out.println("sunday-"+days); else if(days%7==2) System.out.println("monday-"+days); else if(days%7==3) System.out.println("tuesday-"+days); …

Member Avatar for JamesCherrill
0
1K
Member Avatar for burntout

I would like to know how i can replace an outputline with a write to a log file? Ive tried searching but no luck.

Member Avatar for JamesCherrill
0
98
Member Avatar for softswing

Hai, Am using client server applcation, server is in remote machine, while retreving data from client to server , it takes time, for this i want to show the progressbar in between retrieveing time, how can i do this. please help me for this problem.

Member Avatar for mKorbel
0
120
Member Avatar for ayanbizz

In my program to implement huffman algorithm.I have created the huffman codes and stored the ascii values and corresponding codes in a map.While creating the encoded file I followed this approach:I firstly converted the ascii codes in to their corresponding integer values and wrote them in a file.Now ,while decoding …

Member Avatar for JamesCherrill
0
185
Member Avatar for Raven50

[CODE] import java.text.NumberFormat; import java.util.Locale; import java.util.Scanner; class Television { private String itemNumber; private String productName; private double unitPrice; private double unitPrice; //constructor public Television (String itemNumber, String productName, double units, double unitPrice) { setItemNumber(itemNumber); setProductName(productName); setUnitPrice(unitPrice); } //accessor methods for class variables public String getItemNumber () { return itemNumber; …

Member Avatar for jwenting
-1
239
Member Avatar for coalman987

Hi all I'm new and I'm horrible at Java. I've written this decryption code for a Caesar cipher but now I need to decrypt a one-time pad. Is there any way to simply work with what I have and rewrite it to work with a one-time pad? Or must I …

Member Avatar for jwenting
0
699
Member Avatar for sirlink99

I am trying to sense multiple keys at a time and I am wondering how to use a hash map to do this.

Member Avatar for mKorbel
0
145
Member Avatar for bangor_boy

Hi, I am bit stuck here, I have to have edit this code so that a train must wait in front of the tunnel lock for a train to come in the opposite direction to exit before it can enter the tunnel, i have to use java built in synchronisation …

Member Avatar for mKorbel
0
97
Member Avatar for SolidSora

I got an image called badguy and it will not draw in the applet. Here is my code below. [CODE]package mainpackage; import java.applet.Applet; import java.applet.AudioClip; import java.awt.Graphics; import java.awt.Image; public class Test3 extends Applet implements Runnable{ /** * */ private static final long serialVersionUID = 1L; AudioClip shot; Image badguy; …

Member Avatar for mKorbel
0
148
Member Avatar for soft_coder

Hi! I am a .NET developer. I have added a Java WSDL as a web reference to an application. After someday I deleted the reference and added it again. From that day I am unable to build/debug/deploy the solution. I am getting the following error: [B]Custom tool error: Unable to …

0
55
Member Avatar for hellkosmos

hi guys actually i been searching the net for the past days on how to put a background /and or image in apache-tomcat-6.0.29 can you check if something is wrong with my code? i mean if i wanted to put something like .jpg where should i put it in my …

Member Avatar for ztini
0
129
Member Avatar for khwabincod3

Hello, I am a beginner to java and needed some assistance...I am writing code to create my own singly linked list, and an iterator that iterates over the elements of the list...however I don't know how to use the iterator to display the elements of the list and I am …

Member Avatar for ztini
0
251
Member Avatar for sj5536

hi i want to add Scroll Pane to JTable [CODE]JScrollPane jScrollPane = new JScrollPane(table); jScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS); jScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); add(jScrollPane,BorderLayout.CENTER);[/CODE] in the above code table is and Object of JTable with default model i write above code but that code display the scrollbar but they dont work

Member Avatar for sj5536
0
91
Member Avatar for tracydo

Reviewed with answer from my quiz, I want to make sure that I understand it right? If not, what is yours? int x=1; int j; for(j=0; j<=2; j++) x=x*j; System.out.print(x); --------------------- answer is x=0 My understanding is since this for loop has no curly bracket, therefore, no loop after the …

Member Avatar for jokers6
0
122
Member Avatar for charchar88

This game is like the game scramble that you play on facebook. Also similar to boggle. Basically you input the dimension of the grid of letters that you want and the dictionary.txt file and it will print you all the words found. It's suppose to find words in all directions …

Member Avatar for nezachem
0
217
Member Avatar for Kuroshi

I want to learn how to connect computers so I created a game for 2 players that was played on the same computer, now I want it to be played on a network. I have been trying to do this with sockets. I have a server class: [CODE]public class WordsGameServer …

0
96
Member Avatar for hany-h

Hi guys, I have a class (DrawPanel) which extends Jpanel.This class generates random shapes (lines,recangles and ovals) . I am suppose to add a statusbar to this class but I can't add even a simple lable to this panel... I am so frustrated and would be so appreciate if anyone …

Member Avatar for JamesCherrill
0
152

The End.