4,084 Posted Topics

Member Avatar for casinoua

did you pass command line parameters, or just expect it to 'magically work' no matter what instruction you gave to run the application?

Member Avatar for Ezzaral
0
91
Member Avatar for Nickair

look at [URL="http://www.daniweb.com/forums/thread99132.html"]this[/URL] I would recommend not to start with an IDE since their 'utilities' may make it easy to develop, but that doesn't mean it's a better way to learn. if you do want an IDE, check out [URL="http://www.JCreator.com"]JCreator[/URL], it does all you need when you're a starter, but …

Member Avatar for Sonny101
0
157
Member Avatar for lynnajoe

[QUOTE=lynnajoe;1496147] 1)I am a little confused as to where to put certain code. If I am doing inventory and I need to have an array does it go into a separate class? [/QUOTE] you could, but since you're still learning and grasping at the concepts, I would advise against it, …

Member Avatar for jon.kiparsky
0
86
Member Avatar for bindhub

to quote Barack Obama [QUOTE='Barack Obama']YES WE CAN!!![/QUOTE] but to speak for ourselves: but we won't. by doing so, we would hinder your progress in actually learning java, which would certainly become a huge handicap for you when your finals or job interviews arrive.

Member Avatar for stultuske
-3
1K
Member Avatar for Gsterminator

here's a nice link on sorting Arrays, could take a look at that while you're on the subject [URL="http://www.leepoint.net/notes-java/data/arrays/70sorting.html"]Sorting arrays[/URL]

Member Avatar for Taywin
0
141
Member Avatar for LaurenceS1

[CODE=Java]public abstract class Person[/CODE] there's your issue. you can not instantiate an abstract class in Java

Member Avatar for stultuske
0
132
Member Avatar for WolfShield

if it's a jFrame you want to show and hide when clicked on a button, add the right events triggered by the button, and call the setVisible(boolean) function.

Member Avatar for WolfShield
0
105
Member Avatar for devin2203

honestly, I have no idea what you mean ... why is it not an array? why doesn't it work in a for loop? since, how I see it, a for loop will be needed in (at least) one step of your work.

Member Avatar for devin2203
0
461
Member Avatar for mjv89

or, you just set an extra variable within the [CODE] if (a[i] > maximum) { maximum = a[i]; }[/CODE] like: [CODE] int maxLocation = 0; if (a[i] > maximum) { maximum = a[i]; maxLocation = i; }[/CODE]

Member Avatar for mjv89
0
193
Member Avatar for HesterSuma2007

or, they have to enter something like 5+7 - 8 = , store this input in an array of characters and checking for the first occurance of =. when they 've found this, they can go puzzeling (adding, subtracting, ... ) all before this point. even an indexOf("=") could do …

Member Avatar for HesterSuma2007
0
165
Member Avatar for Phil++

I'm going with ezzaral and masijade on this ... just because the OP gave as an example [Code=Java] name[] = { "P", "H", "I", "L", "L", "I", "P } [/Code] it's fairly possible that his teacher asked him to 'create an array which stores all characters as separate elements'. If …

Member Avatar for mKorbel
0
158
Member Avatar for canyvr

I have a few remarks here .. firstly, you're mistaking javascript for java, which is a completely other language. secondly, you're trying to write standard html within script tags, which won't work for obvious reasons, since it isn't javascript code. you also never declare the variables which you are using. …

Member Avatar for canyvr
0
139
Member Avatar for hantuapi

the problem is you're calling a default constructor, while you didn't create specify one. you did, however, specify this one: [CODE] CustomerLoyaltyRewards(String name, String id, String add, String phone, String date, double voucher, int extra) {... } [/CODE] your compiler will create a default constructor for you, but only if …

Member Avatar for stultuske
0
109
Member Avatar for gedas

or you could declare a final variable, which you give a value the first time your loop runs. final variables, once given a value, can never be changed to another value.

Member Avatar for gedas
0
100
Member Avatar for monesh.infy

well ... it sure is nice to see there are still some students willing to put some effort towards their degree ...

Member Avatar for stultuske
0
132
Member Avatar for Prosper92

why do you need a counter? unless I'm mistaken about what you're trying to do, you just need to compare the size of the arrays, not the contents. In which case, you're just fine with checking the .length of the two you need to compare

Member Avatar for Taywin
0
1K
Member Avatar for Amillia89

masjiade was referring to this: [CODE]String pick = "select * from synonym where words like =%'"+st+"'";[/CODE] are you sure you don't need to place the % behind the user selected String?

Member Avatar for Amillia89
0
201
Member Avatar for Shizuo

if you want to write to a file, you need to use BufferedWriter and FileWriter

Member Avatar for Taywin
0
135
Member Avatar for i_me_roo

that's because your class is filled with errors. you are telling the compiler that you are returning an int, both in getOrder() and displayOrders(), but you have no return statement, nor do you have a variable in which you store the value in your main method, or a print in …

Member Avatar for jon.kiparsky
0
951
Member Avatar for georgewb

just read it as String, convert it to an array of chars, or make a new Scanner class in which you define a nextChar() method :)

Member Avatar for ztini
0
3K
Member Avatar for lohit kumar

yes, and quite easily to do, but my advice would be: DON'T just like java itself, jar files are cross platform. if you create an exe, you'll limit your users, since exe files are not platform independant.

Member Avatar for Progr4mmer
0
172
Member Avatar for topaz

and to check the technology? considering the fact that this is a 'Java' forum, giving a solution in javascript might not be what the OP was looking for. now ... next to mine and verruckt24's remark, there was another issue with his post, anyone found that one yet? :) (Yeah, …

Member Avatar for stultuske
0
183
Member Avatar for dannii

for starters, you set your N to be 0 and you never change this value, so your code will never go through your loop.

Member Avatar for dannii
0
186
Member Avatar for nHulk

or, you could try creating a neat app, that floods developing forums with random generated topics demanding for a final year project-topic. millions of whizz-kids-to-be will be in your debt ...

Member Avatar for stultuske
0
118
Member Avatar for gavriela

[QUOTE=gavriela;1472359] [CODE] int []allGrades = keyboard.nextLine( ); System.out.println ("You entered the grades for " + allGrades.length + " students.") int [] allGrades = new int; [/CODE] [/QUOTE] not sure what you're trying to do here, but it looks to me this 'll blow up in your face. you're declaring an …

Member Avatar for Er. Mukesh
0
1K
Member Avatar for coco24

and what is 'BoundedBag'? most times, trouble in output are not technical problems of your computer, it's just a difference between what a developer should've written, and what he actually wrote.

Member Avatar for stultuske
0
127
Member Avatar for njmm
Member Avatar for Limiter

sigh ... sj5536 ... you may want to think about what you're saying.. Limiter: I assume that you want to print an asterisk n times. create an empty String Object, and run a loop, that runs n times. each time you go through the loop, add a '*' to that …

Member Avatar for stultuske
0
261
Member Avatar for odiejodie

I assume you want to compare what you've entered to what you get out of a database. use a jdbc connector to communicate with the database, retreive the data (being a username and a password) out of the database, and use the .equals(Object o) method to compare the values that …

Member Avatar for mKorbel
0
86
Member Avatar for spencer.kindt

if you're trying, what have you tried so far? if you think it should be done with a for loop, write it as such, and see if it does what you want it to do. don't just sit and wait untill we write it for you.

Member Avatar for jon.kiparsky
0
175
Member Avatar for sanam_1

you just compare charx to chary. if they're equals => add 1 to number of repeating characters.

Member Avatar for stultuske
0
85
Member Avatar for LizAE

well, you can add a layout and css (or javascript) code to your html elements, for instance: <ul class="ulClass"> </ul> now you can use this 'ulClass' to link this ul block to css and/or javascript. well, you can use them both, and jQuery is a javascript library, but when it's …

Member Avatar for LizAE
0
188
Member Avatar for carlitosway17

maybe you're not setting the values in floor right. if you declare it as an empty two-dimensional array, and never changes the values, it's normal that if you print it, you don't see anything.

Member Avatar for carlitosway17
0
258
Member Avatar for Danii

[QUOTE=Danii;539183]example if (...){ return 0; } else (...){ return 1; } that do they mean? thnaks in advance[/QUOTE] I'd say they mean you'll be getting some errors while compiling this the (...) in this example is only applicable for the if - part [CODE] if(test){ // what to do if …

Member Avatar for masijade
0
678
Member Avatar for stultuske

for the moment, I'm working on a project where I have to apply filtering as used on one table (using the jQuery datatables plugin) to a next table (which is using the picnet.table.filter plugin). now, I have been able to retrieve the values used to filter from the original table, …

Member Avatar for johnsteve.bravo
0
254
Member Avatar for sj5536

if you wanted to know how to put it in a .exe installer, the answer is: don't. you'll force your users to have a Windows OS installed, which may not always be the case.

Member Avatar for stultuske
0
98
Member Avatar for KKR_WE_RULE

you've set your variables as being static variables. look into a better usage of Student: create an Student-Object that stores the same data,but uses setters and getters to handle the information you're storing. also, you'd better place the code you've added into the Input() method in your prg1 class. This …

Member Avatar for KKR_WE_RULE
0
142
Member Avatar for sj5536

or you could assume that, since stuff like this can in a lot of ways be usefull, it has been implemented in Java already. just go and take a look at what [URL="http://download.oracle.com/javase/1.4.2/docs/api/java/util/StringTokenizer.html"]StringTokenizer[/URL] is all about. I'm quite sure it 'll help you do everything you want (except for making …

Member Avatar for ztini
0
2K
Member Avatar for SolidSora

well ... if what you're trying to do is what I think you're trying, you might want to check on the correct spelling of 'instanceOf'. just changing [CODE] if(vehicles instanceOf SportsCar){ System.out.println("Yes"); } [/CODE] into [CODE] if(vehicles instanceof SportsCar){ System.out.println("Yes"); } [/CODE] might give you just what you want.

Member Avatar for ztini
0
97
Member Avatar for CompSci_Guy

back on topic: a decompiler may get you your code back, based on the .class file. for simple programs, the JAD decompiler always worked for me.

Member Avatar for stultuske
0
160
Member Avatar for vishal18

and every time creating a new instance means after a while you'll have x instances of one object open, while you can only use 1

Member Avatar for vishal18
0
97
Member Avatar for ComicStix

that is because you are filling the same element over and over again ... you are using [Code="java"] for (k = 1; k < 99; k+=2 ){ odds[i] = k; } [/Code] you are filling odds[i] with k, while (k <= 99) but you don't change the value of i. …

Member Avatar for adarshcu
0
314
Member Avatar for bartm669

[QUOTE=ztini;1458399][CODE] public class Matrix { private static int[][] level = new int[][] { {0, 0 , 0}, {1, 0, 0}, {0, 0, 0}}; public static void findTheOne() { boolean found = false; for (int i = 0; i < level.length; i++) { for (int j = 0; j < level[0].length; …

Member Avatar for bartm669
0
136
Member Avatar for hanslim77

there are different ways, you can also add a package that can play .mp3 's and use that :) for instance the jmf (java media framework) or the framework used in [URL="http://www.javazoom.net/javalayer/javalayer.html"]JavaZoom[/URL].

Member Avatar for stultuske
0
323
Member Avatar for kodera
Member Avatar for angskie20

you may ask us help, yes, but we are not going to write it for you. start with writing down the logical steps (pseudocode or nasi schneiderman) try and write the part that you know how to, and try to code the part you don't completely understand. if you run …

Member Avatar for stultuske
0
346
Member Avatar for Transcendent

and change total *= grade; to total += grade; otherwise you will have quite some 'averages' :)

Member Avatar for Transcendent
0
140
Member Avatar for chipsch

either you must instantiate it, or you must make the class static, but that wouldn't help you much in this case. passing the variable to the class using the setter is the best approach, why would you want to change that? ** Edit, sorry just looked this over fast on …

Member Avatar for Akill10
0
220
Member Avatar for jajajamon

no ... we're actually waiting for you to give us the codes you've written so far and tell us where you're stuck. this is a developer forum, not 'developers-for-hire'

Member Avatar for stultuske
0
92
Member Avatar for eny321

in which case you do not remove threads, you edit the posts. a method can not be a boolean, but it can have a boolean as a returnvalue. when a method has a 'void' returnvalue, it means that it does not return anything. if you want it to change a …

Member Avatar for stultuske
0
170

The End.