36,051 Topics

Member Avatar for
Member Avatar for jasonj2248

So I have like 20 errors in here can someone tell me what I did wrong or how I can fix them? I'm trying to write a program to get the area and perimeter of a triangle. import java.util.*; public class myTriangle3 { //Declarations static double area; static double perimeter; …

Member Avatar for Slavi
0
134
Member Avatar for echocoder

I have an instance of Tomcat 7.0.32 installed. The server.xml is configured to use clientAuth="want" in the Connector. I have a Context that has a docBase set to be a network share. This particular Context I want the user to be authenticated before they can access it, otherwise I want …

0
162
Member Avatar for doha786

i have few txt files in one folder. i need a program that will open that folder and read all files one by one to find a string and give me output. so far i got code to do this from only one particular txt file. but i cant make …

Member Avatar for JamesCherrill
0
4K
Member Avatar for puk.akhimien

Hi, I have written an application that identifies if the fisrt number entered is a multiple of the second number. The application also displays the multiplication table of the second number. What I am now trying to do is to identify which postion the multiple is. For example, 5 * …

Member Avatar for Puk_1
0
154
Member Avatar for Arvin1

Hi, i'm new to java, can someone help to solve this question: In Wonderland a man distribute his monthly salary among his family as follows: • Half the salary goes on general expenditure in the house • one third of the remainder is spent on his car • Out of …

Member Avatar for stultuske
-1
416
Member Avatar for newprogidk

Hello great programmers at this website. Hopefully your day has been good so far. I was wondering if you could help me with some Java errors related to the header of my program that I am doing for an assignment. Thank you millions for your help. Here is the code: …

Member Avatar for stultuske
0
173
Member Avatar for V3N0M

Hi guys I am trying to build a simple calculator but I cant get the answer to show in the output in Jtextfield here is the test // Testing Calculator import javax.swing.JFrame; public class CalculatorTest { // Main method public static void main( String[] args ) { Calculator calculator = …

Member Avatar for JamesCherrill
0
201
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
755
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
192
Member Avatar for tanmaymisra

There is a project i am working on its a social networking between chilldren teacher and parents .I want to restrict typ of user to these three only.Do u guys have any idea how to initiate.

Member Avatar for stultuske
0
184
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
105
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
223
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
220
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
227
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
223
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
918
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
233
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
181
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
302
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
212
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
176
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
872
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
122
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
297
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
288
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
91
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
111
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
262
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
329
Member Avatar for titus.k.s

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

Member Avatar for stultuske
0
151
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
170
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
314
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
558
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
180
Member Avatar for R0bb0b

Hi, I am a PHP developer that has been put on a Java project and am trying to apply the same principles with new ones that Java provides and am stuck. I have successfully instantiated a class with a variable class name, which contains a constructer that has one parameter. …

Member Avatar for R0bb0b
0
174
Member Avatar for aone.gaiemoabi

you are to write a Java program that asks the user to enter the following 4 numbers one at a time: 4.34 , 2.39, 1.34 0.9. Thereafter the is to print all the numbers back onto the screen followed by the average of the four numbers. Finally it should print …

Member Avatar for Slavi
0
152
Member Avatar for soche123

Hi guys how are you? I am having tough time extracting data from the ms database. I have three rows. WHat I want to do is the extract data from these three rows and pass to labels and display in the frame. But I'm stuck on the first one. my …

Member Avatar for llaspina
0
253
Member Avatar for surum
Member Avatar for stultuske
0
123
Member Avatar for soche123

int counter; counter=1; rs = statement.executeQuery("SELECT * FROM Quiz WHERE SrNo=counterr");

Member Avatar for stpatrck
0
109
Member Avatar for Steve_19

I was studing the ant task dirname. I am in over my head understanding this animal. It suggests to me that I could use build.properties and or build.xml properties . The same possibility arises in java code and I benefited greatly by loading xml properties. In the ant enviornment is …

Member Avatar for Steve_19
0
169
Member Avatar for Chem_1

what is the difference between this packages in Eclipse?Im beginner in java which package should i download. Luna Packages Kepler Packages Juno Packages Indigo Packages Helios Packages Galileo Packages Ganymede Packages Europa Packages

Member Avatar for jwenting
0
182
Member Avatar for softDeveloper

Hi everybody! I´ve used jdk to generate my certificate with the following command: keytool -genkey -keyalg RSA -alias certificatekey -keystore keystore.jks -storepass password -validity 360 -keysize 2048 Everything works fine when I want to digitally sign an e-mail using: import javax.mail.* and import javax.mail.internet.* # and MimeMessage and Multipart. #. …

Member Avatar for stultuske
0
223
Member Avatar for henryz_box

I have a button with action listener. When action is performed I call a method to show a label with my message using: Actionperformed(){ ShowMessage(); PerformAction(); } NOTE: This code is just an example. The problem is the message never shows even though the action is performed. Any help will …

Member Avatar for henryz_box
0
343
Member Avatar for Clif40RD

I'm Having a problem with trying to figure out how to get my program to switch from one tab to another after a specific "Jbutton" is clicked. As displayed Below.

Member Avatar for llaspina
0
512
Member Avatar for surya55

Hi everyone, consider below code: interface i{ void test(); } class A implements i{ void test(){//code goes here} } class B implements i{ void test(){//code goes here} } here,we can implement method straightaway in class itself, without using interface like, class A{ void test(){//code goes here} } why we want …

Member Avatar for ~s.o.s~
1
230
Member Avatar for softDeveloper

Hi everybody! I´ve used jdk to generate my certificate with the following command: > keytool -genkey -keyalg RSA -alias certificatekey -keystore keystore.jks -storepass password -validity 360 -keysize 2048 Everything works fine when I want to digitally sign an e-mail using: # import javax.mail.* # and # import javax.mail.internet.* # and …

0
158

The End.