32,199 Topics

Member Avatar for
Member Avatar for DawnofanewEra

Hello, I've been trying to read txt from a file, and breaking each line into words and storing them in Array. Example. txt file C001 John Smith 999999 C002 Mary Agnes 888888 Here is my code. public class Customer implements iCommand{ static List<Customer> cust = new ArrayList<Customer>(); static private String …

Member Avatar for niranga
0
2K
Member Avatar for bro3886

I am thinking to develop a program/software to simulate autonomous driving car (artificial intelligent agent) using java. A car(agent) will move forward avoiding the obstacle in the dynamic environment. How do i start?

Member Avatar for stultuske
0
749
Member Avatar for ADETUNJI_2

I need my running java application to be able to detect a web address that is typed into any browser's address bar. This is because I need it to make a decision depending on which website is typed into the bar. It would be best if I can rather get …

Member Avatar for Slavi
0
188
Member Avatar for Muhammad_42

how to write a pseudo-code for telling someone how old they will be in 15 years to come

Member Avatar for mussdroid
0
102
Member Avatar for Chem_1

Getting errors in my java program.Please retify my program errors,Explain the mistakes? class Cine { double t=70.00; String i="CINEPOLIS"; String j="HAPPY"; { public void worldCine(); { System.out.println("Ticket rate:" +t); } public void worldCine1(); { System.out.println("Theatre name:" +i); } public void worldCine2(); { System.out.println("Movie name:" +j); } } public static void …

Member Avatar for Chem_1
0
221
Member Avatar for codewar

Yes, I am new to Java as you will see from my post. I have done most of the work therefore; I am not interested in someone to doing my work for me rather I am looking for a new set of eyes. My program is to keep track of …

Member Avatar for codewar
0
216
Member Avatar for codewar

Hello, team. When I run my program it is not allowing me to run this program. Looking to the professionals for some help. Tester import java.util.Scanner; public class ProductTester //the class ProductTester { public static void main( String[] args, Object getPrice) //the main statement { Scanner user_input = new Scanner( …

Member Avatar for codewar
0
225
Member Avatar for manaila

Hi All, Interfaces cannot be instantiated. Could you please explain why the following is valid: interface MyInterface{} MyInterface[] myInterface = new MyInterface[]{"a", "b"}; Cheers!

Member Avatar for manaila
0
222
Member Avatar for smartguy360

I tried dreamincode but the mods there are pretty mean so i have come here to humbly beg for help. First off let me start by saying I'm a new programmer and I am frustrated and cofused by the class i'm in prg 420. I need to pass this assignemn …

Member Avatar for JamesCherrill
0
912
Member Avatar for Pablo149

Hey there everyone, I have been a computer programming instructor for several years now. I like helping my students, but every year, they are the same age, and have generally the same skill set. So yes, I'm getting bored: it just feels like doing the same thing year in year …

Member Avatar for Hiroshe
1
230
Member Avatar for reuben_1

Hi there I have a problem which I would like to get solved. I am making a ultra modded survival server (a minecraft modpack) and I have created the whole server but I still have one problem, biomes o plenty is not working. I have the server.properties level-type set to …

Member Avatar for AndyKY
0
179
Member Avatar for Siick7

Right now I'm having a problem getting my program to run, it compiles with no errors. The only previous error I had was that it stated reached end of file while parsing which I think I fixed. Can anyone help me? import java.util.Scanner; public class Payyroll2 { public static void …

Member Avatar for stultuske
0
298
Member Avatar for Daminic24

Hi i need help with the code ive done in java, iv got a project im doing and i get this when i run my program. --------------------Configuration: <Default>-------------------- Usage: java [-options] class [args...] or java [-options] -jar jarfile [args...] (to execute a jar file) where options include: -d32 use a …

Member Avatar for JamesCherrill
0
209
Member Avatar for funnym3

Hi! I'm having hard time where to put the system.out.print code in my assignment. please check my codes, I'm still new and learning in java sorry If I have mistakes :) here: import java.util.Scanner; public class SelectionSort { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.println("Enter …

Member Avatar for JamesCherrill
0
170
Member Avatar for AbstractEden

Hello, I mainly wanted some tips and advice on ways to optimize this code, it's actually an exercise from my class' power point file. It says: Exercise 1 Sam and Ella's Delicatessen wants you to write a program to take orders from the Internet. Your program asks for the item, …

Member Avatar for AbstractEden
0
863
Member Avatar for Slavi

Hey guys, I made the game Rock Paper Scissors where 2 players can play against each other. Here is my client's GUI ( The server doesn't need 1) and I was wondering what else to do to make it better looking/more "advanced". Any feedback is appreciated - The entire GUI …

Member Avatar for Slavi
0
121
Member Avatar for rowen_1

In a 4 player network big 2 card game. how do I track a player turn? so in my program, my server will wait for 4 clients to login. my server will spawn a new thread each time a client is connected after 4 clients have log in, the server …

Member Avatar for JamesCherrill
0
1K
Member Avatar for rowen_1

This is a contiunation of https://www.daniweb.com/software-development/java/threads/484036/java-network-game-keeping-track-of-a-player-turn# Right now my server will read for incoming connections from the clients. if it reaches 3, it will break off from the while loop and any more clients connected after that will be refused. I set the first player by doing this. game.currentThread = …

Member Avatar for JamesCherrill
0
295
Member Avatar for mikewyatt

I have multiple embedded database that all work fine while running inside netbeans, but when running the program outside (stand alone) of netbeans one of the databases does exist ie the error java.sql.SQLSytaxErrorEception: Table/View'RACE_DATABASE' does not exist. The database is confirmed as embedded when checking its properties. this was working …

Member Avatar for juliuas
0
285
Member Avatar for hwoarang69

using: eclipse I have created a android app and I am trying to add some ads on to it. I am using admob.com but I am not sure what I am doing wrong. First here is error I am getting: #------- #ERROR: #------- 08-27 23:09:03.650: E/AndroidRuntime(26340): FATAL EXCEPTION: main 08-27 …

Member Avatar for peter_budo
0
1K
Member Avatar for titus.k.s

i ecounter problem again, this time different, i've success compile my project from.java to .jar then compile .jar to .exe, then i have try my .exe result, so at first was working well, but when need connection to database, that was appear notification connection failed .. thats all my problem.. …

Member Avatar for titus.k.s
0
89
Member Avatar for titus.k.s

what should do? if show() replace with setVisible(True) then.. getText() replace with ? addItem() replace with ?

Member Avatar for stultuske
0
105
Member Avatar for titus.k.s

when i was compile with -Xlint: unchecked then got some warning like this Compiling 12 source files to C:\Users\Titus\Documents\NetBeansProjects\SITA\build\classes warning: [unchecked] unchecked call to addItem(E) as a member of the raw type JComboBox what should i do?

Member Avatar for jwenting
-1
259
Member Avatar for titus.k.s

i had use combo box like this {jComboBox2.addItem("-- pilih menu --"); try { String sql = "select * from iomenu"; Statement cn = con.createStatement(); ResultSet rs = cn.executeQuery(sql); while (rs.next()) { jComboBox2.addItem(rs.getString("KodeMenu")); } } catch (Exception e) { } } but when i build that was had warning like this …

Member Avatar for stultuske
0
319
Member Avatar for titus.k.s

can you resolve this warning? warning: [deprecation] getText() in JPasswordField has been deprecated

Member Avatar for stultuske
0
148
Member Avatar for Chem_1
Member Avatar for anand01

Dear All, Recently I have updated jre 1.7 with update 55 in client machine. When I open a applet application form loading time increased up to 1 min. The same application is working fine in java 1.6. As of my understanding this happens because of certificate revocation checks. When I …

Member Avatar for anand01
0
167
Member Avatar for johnson_2

First of all I apologize as my explainations is going to be lengthy I have a server that listens to incoming clients and they are connected to localhost. **Assuming that I only have 2 clients and assuming they only enter a text ONCE** so each time the client is connected, …

Member Avatar for raj.mscking
0
312
Member Avatar for m4mukulgarg

Hi all ive been thinking of a writing a compiler in java for my final year project. I have started to browse the net for help but to be honest its confused rather than helping me to get a clear image of what I would like to do. Ok.. let …

Member Avatar for Schol-R-LEA
0
515
Member Avatar for surya55

Hi all, for the below code: class A{ } class B extends A{ } why we extends 'A' class to inherit the properties in 'B'? Here we can use, class B{ A a = new A();//to get properties of 'A' class } why should we go for inheritance by using …

Member Avatar for stultuske
0
177

The End.