32,204 Topics

Member Avatar for
Member Avatar for toluyinka2004

can somebody help me to produce a java midlet that randomly generates arithmetic problems for the user and records the time that it takes to answer ten correctly using single digit numbers and operands +,- or *, when a problem is answered correctly or incorrectly, a new problem is produced

Member Avatar for peter_budo
0
41
Member Avatar for kolibrizas

[CODE]int a = 4, b = 3; String code = "a*b+a+2*b"; int result = unknown_function(code); System.out.println(result);//expecting 22[/CODE]Any ideas how to do that please?

Member Avatar for masijade
0
91
Member Avatar for kjiu

Hello, I have to change this code (c++) on Java, can you help me. [CODE] QAbstractItemModel *MainWindow::modelFromFile(const QString& fileName) { QFile file(fileName); if (!file.open(QFile::ReadOnly)) return new QStringListModel(completer); #ifndef QT_NO_CURSOR QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); #endif QStringList words; while (!file.atEnd()) { QByteArray line = file.readLine(); if (!line.isEmpty()) words << line.trimmed(); } #ifndef QT_NO_CURSOR QApplication::restoreOverrideCursor(); #endif …

Member Avatar for masijade
0
81
Member Avatar for yakovm

Hello We runing rmi client and server from one computer the code files in the same directory [CODE]javac *java rmic FileImpl start rmiregistry java -Djava.security.policy=policy.txt FileServer[/CODE] after that we start a client [CODE]java FileClient kuku.txt 127.0.0.1[/CODE] Does we intiate several JVMs by starting client and server if not how to …

Member Avatar for masijade
0
86
Member Avatar for lithium002

Hello, I've a program that asks a user for four different integer values, and then draws a rectangle on a graph based on those values. I have done everything except now I need to set limits within the program so a user can only use valid values and I'm lost! …

Member Avatar for BestJewSinceJC
0
2K
Member Avatar for bruceaj

I'm trying to pass "this" as an argument of a constructor. Is there any way can determine what the type of Object "this" is? Thanks....

Member Avatar for bruceaj
0
65
Member Avatar for wolfy101

[CODE]import java.util.*; class multiplicationquiz { public static void main(String[] args) { Scanner a = new Scanner(System.in); int b,right,totalscore; right = 1337; //boredom totalscore = 0; b = 0; do { double numb = Math.round((Math.pow(10, 2) * Math.random())); double numb1 = Math.round((Math.pow(10, 2) * Math.random())); double valueFirst; double valueSecond; valueFirst = …

Member Avatar for rigidboss
0
95
Member Avatar for ineedhelp09

Hey everyone, I'm new at this.. so please bear with me. Anyway, I'm really confused. I'm supposed to convert the first character of the String firstName to upper case. Problem is... I have no idea how to :-/ I've done so much research and reading and still nothing. Please help …

Member Avatar for webmstr
0
189
Member Avatar for ceatkin2

Here's my problem. I'm reading in a string of numbers from the user using the scanner class in the main method. I assign that to a variable "s". I pass "s" to a method that converts the String (let's say its a string of 10 numbers) and trying to convert …

Member Avatar for oldSoftDev
-1
110
Member Avatar for gibson.nathan

ive got most of this figured out. the problem is then when i run, instead of my methods iterating through my array list, they simply reuse the same data set over and over, giving the same results. if anyone can help, it is appreciated. [CODE] /** * Write a description …

Member Avatar for gunjannigam
0
126
Member Avatar for faeze.m

please help me to write a program polynomial codes in java(multiply.add &.....between polynomial)????ok? every one can write this program please help me... thanks alot:icon_smile:

Member Avatar for rcook
0
85
Member Avatar for frankycool

I have an arraylist As such :- products.add( new CarsSubProduct( "FordMustang",1,12,10000 ) ); products.add( new CarsSubProduct( "JEEP",2,10,10000 ) ); I am trying to Edit just the value 12 without altering the value of the other objects but no success.When i use the set method it automatically modifies all the four …

Member Avatar for ~s.o.s~
0
847
Member Avatar for Rahyalain

This my problem>>>>if any one can solve it>>> Write a java program that calculates and prints out bills of the city water company. The water rates vary, depending on whether the bill is for home use, commercial use, or industrial use. A code of 1 means home use, a code …

Member Avatar for VernonDozier
0
2K
Member Avatar for tknopriest

OK... so I am pretty new to Java and need some help. I'll try to explain as best I can... I am trying to create a frame that will be a "menu frame" and then based on which option the user picks (JButton) it will then run the version of …

Member Avatar for tknopriest
0
75
Member Avatar for spiderpratik

How do I run an applet in the BlueJ terminal window? Please provide a code for the solution or an alternate method to do this as soon as possible. [code=Java] package applets; import java.awt.event.*; import java.awt.Graphics; import java.awt.Font; import java.applet.Applet; public class NervousText extends Applet implements Runnable, MouseListener { String …

Member Avatar for spiderpratik
0
101
Member Avatar for Bheeman89

Hello Guys. I need a help here. I am doing a system using Java with GUI. SO im curious how to add a value that i have extracted from a JTextField and display it as a List in the Jlist. Here is my coding [CODE] //function for collecting data from …

Member Avatar for javaAddict
0
528
Member Avatar for udayangaS

hey guys, i have a problem when am deploying a spring application i tomcat... i have got exception like this. [CODE]Nov 15, 2009 3:43:53 PM org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring FrameworkServlet 'dispatcher' Nov 15, 2009 3:43:53 PM org.apache.catalina.core.ApplicationContext log SEVERE: StandardWrapper.Throwable java.lang.NoSuchFieldError: ruleMemo at org.springframework.expression.spel.generated.SpringExpressionsParser.<init>(SpringExpressionsParser.java:94) at org.springframework.expression.spel.antlr.SpringExpressionsParserExtender.<init>(SpringExpressionsParserExtender.java:37) at org.springframework.expression.spel.antlr.SpelAntlrExpressionParser.<init>(SpelAntlrExpressionParser.java:51) at …

0
70
Member Avatar for Ryujin89

I have created the output for a program that allows a user to input their employee name and number and then their hourly wage and their total number of regular hours and overtime hours. This is my first time working with this type of program in java and I'm having …

Member Avatar for Ryujin89
0
205
Member Avatar for pwk064

I need to change the font size after I click. How can I do that - Thanks! here is the code [code=java]import java.applet.*; import java.awt.*; import java .awt.event.*; import javax.swing.*; import java.util.*; public class JChangeFont extends JApplet implements ActionListener { JLabel question = new JLabel("Who's number one?"); JButton click = …

Member Avatar for peter_budo
0
90
Member Avatar for JavaStudent23

[B]Hi everyone,[/B] I’m working on a public transport card system which records the no. of stops of the journey and then calculates the costs. I’m a bit lost with this program and I hope you can help me... Features; the fare for up to 3 stops is charged £4, after …

Member Avatar for javaAddict
0
122
Member Avatar for triplea_2005

The question ask: Write a program that asks the user to enter one of the following state abbreviations: NC, SC, GA, FL, or AL. The program should then display the name of the state that corresponds with the abbreviation entered (North Carolina, South Carolina, Georgia, Florida, or Alabama). This is …

Member Avatar for thines01
0
101
Member Avatar for Devoted Hosting

Hello there, I am curious as to whether there's any 'easy' way of creating 3D models (e.g. animals, Humans etc) via a Java applet? I know in a full-blown application one could use Java 3D (with the Java 3D libraries being installed with the application), but is there an 'easy' …

Member Avatar for Devoted Hosting
0
108
Member Avatar for TigerGirl

Hi. I am trying to write a mergeSort method, but I keep getting the wrong sorted array. [CODE]public static void mergeSort(int[] num, int left, int leftEnd, int right, int rightEnd) { int [] temp = new int[num.length]; int position = left; int number = (rightEnd + leftEnd) - 1; while( …

0
75
Member Avatar for obautista

I need help converting this code that is using Linear Probing to Quadratic Probing. I am not sue how to accomplish that. Can someone help me? Thanks so much... import java.util.*; // A HashMap class which uses linear probing public class HashMap383<K, V> { // array-based; this is the array's …

0
67
Member Avatar for kiranpvsr

Hi, I have built a web browser using JEditorPane . But instead of using setPage method, I have used setText method The code sample looks like this: displayEditorPane.setPage(pageUrl); // Get URL of new page being displayed. URL newUrl = displayEditorPane.getPage(); When setPage is used, correct URL value is stored in …

0
62
Member Avatar for frankycool

HI i am using this syntax to store arraylist to inventory.dat file.When i store, it give a scattered output on the .dat file like this..... ¬í sr Carsguimainexecution.SaleinfoÕE£ñWfö L productsalest Ljava/util/ArrayList;xpsr java.util.ArrayListxÒ™Ça I sizexp w sr Carsguimainexecution.SalesubZ㾝ÓÅ xr Carsguimainexecution.SaleProductøié>‘2q I CarnumberD pricesoldI productNumberD stockD unitsoldL Carbuyert Ljava/lang/String;L Carnameq ~ xp …

Member Avatar for javaAddict
0
217
Member Avatar for kjiu

Hj, Why does't appear at editor ? [CODE] public void date() { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); java.util.Date date = new java.util.Date(); String datetime = dateFormat.format(date); this.editor.insertPlainText(datetime); }[/CODE]

Member Avatar for javaAddict
0
67
Member Avatar for ninjaelves

Hi im trying to use an equals method to check if two bargraphs are equal, but when I run the method, it always says that they are not equal. Could you please tell me how to fix this? Thanks My code for the method [CODE] // equals method public boolean …

Member Avatar for javaAddict
0
131
Member Avatar for ramjeev

Can u suggest any better link for datastructure that explains with diagrams?It would be good,if any basic level explanation with algorithms.

Member Avatar for ramjeev
0
75
Member Avatar for frankycool

I have an arraylist As such :- products.add( new CarsSubProduct( "FordMustang",1,1000,10000 ) ); FordMustang is Car name 1 is Car number 1000 is total number of cars in stock 10000 is price per car I will like to Store it to access database or excel.Please how can these be done.

0
73

The End.