35,618 Topics

Member Avatar for
Member Avatar for jelly46

Hello I am unable to to edit a json file i need to add some updates but i keep getting Error: Parse error on line 8: ... "text" : " company name -----------------------^ Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', got 'undefined' I am trying to add a paragraph …

Member Avatar for paulkd
0
159
Member Avatar for henrydmainguy

write in java language,to find the maximum,minimum andmean value of asset of floating point numbers to be supplied by the programmer user

Member Avatar for JamesCherrill
0
104
Member Avatar for parkz16

there are no visible error in the syntax but when i run the application i keep getting the following error. i have been trying to fix it for hours and simply cant find the problem. the error that appears when running is; Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at javax.swing.JComboBox.setModel(JComboBox.java:292) at …

Member Avatar for bguild
0
33K
Member Avatar for cisumma

My programs objective is to mkdir and ope dir. if I ever get it jarred up I would like to run it from a jump drive. [code] public static final String USERHOMEDIR = System.getProperty("user.home", "."); [/code] clearly this code will not be valid any more. Could this USERHOMEDIR be replaced …

Member Avatar for cisumma
0
554
Member Avatar for Neon Tetras

I'm working on a Grade Point Average Calculator. The user just have to Select the number of courses offered, then select the grade obtain in the different courses by choosing the appropriate grade from the Choice Box. The problem with my application is that, if the user mistakenly selects "A" …

Member Avatar for Neon Tetras
1
169
Member Avatar for sk8ergirl

hi, how can I make the size of the array is equal to the number of elements in the array

Member Avatar for JamesCherrill
0
264
Member Avatar for aadarsh_khare

Could anyone help me in understanding what does below Python code do? Also please help me in converting it into Java. import random howMany = random.randint(0,1000) stats = {} for i in range(howMany): value = random.randint(0,500) stats.setdefault(value,0) stats[value]+=1 for item in stats: if stats[item] > 1: print item

Member Avatar for JasonHippy
-1
277
Member Avatar for firdousahmad

Asalam U alikum I want to learn Java programming I have installed the jdk7 on my machine and i want to set the environment variables as it shows me that javac is not the internel or externel command.So can anybody help me

Member Avatar for JamesCherrill
0
77
Member Avatar for glao

Hello , I have a List<String> and I want to compare in a loop the elements. For example sth like : for (int i=0;i<theList.size();i++){ while (theList.get(i).equals(theList.get(i+1))) ... } I want to compare the next to the previous entry. Thanks

Member Avatar for glao
0
142
Member Avatar for sushants
Member Avatar for stultuske
0
106
Member Avatar for zxz

Hi everyone , i hope someone helps me out. im working my way up step by step learning Java . but no one at the University is helping , they just give us the homework and we have to learn alone.and give the soltution at the end of the week. …

Member Avatar for stultuske
0
282
Member Avatar for noobCode

Hello. Im new here. I have a question: I have this copy constructor here: /** Copy Constructor. * Since landscape is immutable in the scope of our project, you could * do a simple reference copy for it. * However, Fish and Plants are mutable, so those lists must be …

Member Avatar for stultuske
0
277
Member Avatar for riahc3

Hello Ive come up with a stupid question that just needs a why What would this do? for (int i=5; i<2;i++) { System.out.println("What?"); } System.out.println("Who?");

Member Avatar for deceptikon
0
181
Member Avatar for peymankop

Hi...! I'm Working on a Notepad project and i'm in menu->view->font but i don't have any idea how to write a function for it! can anyone help me?! thanks...

Member Avatar for aVar++
0
89
Member Avatar for game06

i have a enemy and spriteanimation classes. in Enemy class i have bufferedimage array with 4 different images. than i am creating a animation and storing in 'animationEnemyHit' variable. than i am starting and updateing the animation in method. the problem is that it keeps on loop for ever. i …

Member Avatar for gusano79
0
179
Member Avatar for riahc3

Hello This is a demo showing Java interacting with Daniweb's new API ( http://www.daniweb.com/api/documentation ) You introduce a member's name and it should show you the total number of posts he has made. Demo is a proof of concept: No bug checking, error checking, etc is in this code. In …

Member Avatar for peter_budo
4
877
Member Avatar for Cyairak

import java.util.Random; import java.util.Scanner; public class RandomDeck { String suit[] ={"Diamonds" , "hearts" , "spades" , "clubs"}; String face[] = {"A" , "Two" , "three" , "four" , "five" , "six" , "seven" , "eight" , "nine" , "ten" , "jack" , "queen" , "king"}; String cards[] = new String[52]; …

Member Avatar for JamesCherrill
0
142
Member Avatar for mjbor1

hello i am working on a simple panting project that allow the user to select a shap from ComboBox then draw it on the panel but problem is when is choose any type of shapes and drawing it on panel no shape appear on the panel ?! here is my …

Member Avatar for mjbor1
0
308
Member Avatar for Maryooma1

1. Given a length of wire P units long, where P is an integer, it is possible in some cases to bend the wire into an isosceles triangle(with two sides equal) where the lengths of all the sides are also integers. For example a wire of length P = 3 …

Member Avatar for JamesCherrill
0
202
Member Avatar for Dane2259

I once did a project in a class that connected to a mySQL database, but now I'm using the jGRASP ide on a mac and the class files won't compile properly. In the project we added the files: Connection.class, ResultSet.class, Sql.class, and Statement.class to the directory (assuming it's the middleware). …

Member Avatar for jwenting
0
136
Member Avatar for DarkLightning7

Ive been working on pathfinding algorithms for a couple weeks now and A Star has me stumped. Right now i am attempting to Pathfind over a maze in a matrix of the form boolean map[x][y][5]; where index 0-3 are the walls on the cells starting on the right with 0, …

Member Avatar for DarkLightning7
0
275
Member Avatar for london-G

Hello, I have a set of fields which I need to save into my database, my problem is that the format with java and mysql doesn't match. I converted everything to String which works but I need to store the data as Date. As I will need to retrieve information …

Member Avatar for kieuvantruyen
0
4K
Member Avatar for xxwikkixx

Hey everyone I was programing a small game and I am trying to figure out how to send an int value to a class and return a String from it. This is my code: This is my main.java class public class GamGUI { /** * @param args */ public static …

Member Avatar for riahc3
0
318
Member Avatar for bibiki

hey there everyone. I hope you're all well. Alright, I am working on testing a project using Selenium. I know that this is a Java forum and not a Selenium one, but I am used to using this one so I am starting here. Plus, I am very confident that …

0
74
Member Avatar for cisumma

I am learning to build.xml a project with eclipse ide. below is the MANIFEST.MF that I am creating. The build shows that the manifest is being written in the dir structure below. The dir META-INF (sibling to the src) contains this MANIFEST.MF [code] Manifest-Version: 1.0 Ant-Version: Apache Ant 1.8.1 Created-By: …

0
85
Member Avatar for andymarin

Hi guys, I'm having trouble with my code and I'm kind of new in Java so I don't know what to do. I have to do a program with Buttons and each button has to take me to another class (I don't know if I'm being clear). For example if …

Member Avatar for andymarin
0
708
Member Avatar for revolter00

hi folks, i want to develop a desktop application which will continuously receive text commands from a connected mobile device, via bluetooth rfcomm protocol. i went through hundreds of code examples, including jsr-82 bluetooth & obex api demos; but cannot get what i wanted. one of the popular examples that …

Member Avatar for meghana.Nlknt
0
1K
Member Avatar for rickdeckbar10a

Just some information about myself. I am a 42 year laptop technician returning to college majoring in an Application Development associates degree program at community college starting this summer 2013. I really need some information from the experienced programmers who have been in the job market market for a while. …

Member Avatar for rubberman
0
203
Member Avatar for angeeb84

I have been stuck on this problem for a while. I can't figure out why it is skipping over the last part of my program where it starts double totalMoviePrice. Here is what I have: import java.util.Scanner; public class OnDemandMovieHits_AngelaBrasley { public static void main(String[]args) { String[] movieName = new …

Member Avatar for angeeb84
0
329
Member Avatar for Varunkrishna

Is the following Code correct, for calculating Decimal to Triskaidecimal and Triskaidecimal to Decimal, I hope this code is not right import java.util.Scanner; public class converter { /* 1) Decimal To Triskaidecimal 2) Triskaidecimal To Decimal 3)Exit. */ public static void main(String ar[]) { int a, b; String s; System.out.println("Please …

Member Avatar for bguild
0
227

The End.