Posts
 
Reputation
Joined
Last Seen
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
42% Quality Score
Upvotes Received
5
Posts with Upvotes
5
Upvoting Members
5
Downvotes Received
10
Posts with Downvotes
6
Downvoting Members
7
3 Commented Posts
~21.4K People Reached
Favorite Tags

53 Posted Topics

Member Avatar for Xeros606

I think u can make use of the filter method that has been given here and it will return the filtered array without any zero's...... Think this will do the trick [CODE]public int[] filter(int[] arrNumbers){ ArrayList arr = new ArrayList(); for(int i=0;i<arrNumbers.length;i++){ if(arrNumbers[i]!=0){ arr.add(arr[i]); } } int retVal[] = new …

Member Avatar for JamesCherrill
0
3K
Member Avatar for jrosh

Guess This code will give u some idea The Database Connection Code import java.sql.*; /**@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@The Class Used To Make The Database Connection@@@@@@@@@@@@@@@@@@@@@@@@@@*/ public class DBConnection { public Connection con; public Statement st; public ResultSet rs; public DBConnection() { con=null; rs=null; st=null; } /**@@@@@@@@ Makes Connection With The Database@@@@@@@@@@@@@@@@@@*/ public void …

Member Avatar for Sardar_1
0
2K
Member Avatar for techgeek420

The problem is on line 52 [CODE]displayroot1.setText(df.format(root1+" and "+root2));[/CODE] As you are trying to format a Sting which is not a decimal Replace the code as [CODE]displayroot1.setText(df.format(root1)+" and "+df.format(root2));[/CODE]

Member Avatar for stultuske
0
188
Member Avatar for 47pirates

It seems that you are referring to a how to control the cell. For this you will either have write your cell editor or override the DefaulCellEditor which is usually added to cells. Add a keylistener to the editor component where you would be able to listen to the enterkey. …

Member Avatar for Zaad
-1
212
Member Avatar for GeekTool

> i want to apply all i have learned from this chapter in this project. So can you give me any idea about using loops ? Well if you need to loop may be you can use the do while loop and ccontinue on letting the user ask questins until …

Member Avatar for stultuske
0
134
Member Avatar for jwings

First; for you to take the image from the relative path your folder should be in the path **D:\\JAVAworkspace\\CH6HowtoProgram\\resources** or to take the relative path it should be like **\\src\\resources\\CS2103_Logo.png** > I also have one addition problem about GUI design. > If my design have one main body but after …

Member Avatar for NormR1
0
256
Member Avatar for venkateshyeluri

> How could I encrypt admin credentials during initialization For this you could use a encryption strategy may be like the MD5 and store it in the DB pwd field. And when user enter the pwd in application you should encrypt that as well and then compare the entered value …

Member Avatar for JamesCherrill
0
217
Member Avatar for peck3277

its better you post the code on what you have done so far so that we would be able to help based on that

Member Avatar for Zaad
0
144
Member Avatar for jade_91

> i thought String was a class name? **String** is a class name. But you cannot use *string* instead of **String** in java it is case sensistive so **String** and *string* are not the same as NormR1 had already explained. [Refer Java API](http://docs.oracle.com/javase/6/docs/api/) for further clarification.

Member Avatar for Zaad
0
428
Member Avatar for Zaad

Hi techies got a small problem a swin related one... I found a similar article here [Click Here](http://www.daniweb.com/software-development/java/threads/89427/how-to-programatically-select-a-cell-in-a-jtree) But seems no answer for that in that particular thread in this forum. Since that is a very old thread thought it would be right to put in my question as a …

1
64
Member Avatar for uurcnyldrm

[QUOTE=uurcnyldrm;1758048][URL="http://www.cs.bilkent.edu.tr/~david/cs102/11possibleprojects.htm"]CS102 Possible Project Ideas[/URL] This is from our lecturer's webpage. I know, it is difficult but please give me an idea looking the project ideas in this list. The deadline to decide what we are going to do is coming, and we can't decide anything yet. Thanks in advance.[/QUOTE] This …

Member Avatar for DavidKroukamp
0
710
Member Avatar for 3nrichedd

Okay try this algorithm for this you need to iterate 6 times to print all right so for that have a main loop stating to iterate 6 time and include the other iterations within that loop I have given the pseudo code below [code] for (x=5 until x>=0 and deccrement …

Member Avatar for Zaad
0
139
Member Avatar for Zaad

Hi; This is a code that I got from the examples in Oracle in using the javax.print When i try to compile and run a get an error saying javax.print.PrintException: java.lang.IllegalArgumentException: URI is not hierarchical [CODE]package printtry; /* * Copyright 2001 Sun Microsystems, Inc. All Rights Reserved. * * This …

Member Avatar for Zaad
0
4K
Member Avatar for Zaad

Hi All; Im just making a simple Desktop app. Ive got a need so that the user could be able to add data to the table dynamically. Ive done implementing the table and also code for adding rows. Issue is after i add the row it is not displayng in …

Member Avatar for Zaad
0
1K
Member Avatar for nicolemarie

Post the codes with the code tags Also u have given the methods but not the class names so that we could understand to help you. Only gving it would help us understand whether u are instantiating the correct object for the method call... Repost with code tags and complete …

Member Avatar for Zaad
0
992
Member Avatar for Gsterminator

[QUOTE]public boolean(SLinkedList obj)[/QUOTE] You have missed the method name here, that why it throws and error as identifier expectd... Give a method name like [CODE]public boolean methodName(SLinkedList obj)[/CODE]

Member Avatar for Gsterminator
0
195
Member Avatar for MichaelCJ10

the problem is that in line 74 you directly get the value and directly assign it to the variable [CODE]houseCost[/CODE] which is why you get the cost as -1. Suggest that you change the code as a different variable to take the input say [CODE]double enteredVal;[/CODE] And if the input …

Member Avatar for DavidKroukamp
0
263
Member Avatar for pbracing33b

[CODE]model.getFrequencyListName(location)[/CODE] returns an array of int[]. So some ways you could do is as below according to your requirements you may choose 1. Either loop though the array and print all the elements of the array. ex: [CODE]for (int i=0;i<model.getFrequencyListName(location).length;i++){ System.out.println(model.getFrequencyListName(location)[i]); }[/CODE] 2. If you are sure about the index …

Member Avatar for Zaad
0
185
Member Avatar for gouki2005

It seems that there is an issue with the mapping that you have given for the class. Go through the mapping as to where the contradiction is.

Member Avatar for Zaad
0
204
Member Avatar for askylitcity

[QUOTE]Given a number n > 0, Returns a number m such that n = 2^m.[/QUOTE] n = 2^m For the calculation of m it can be taken as follows log(n) = log(2^m) log(n) = m log (2) Therefore m = log (n)/log (2) for the log you could use [CODE]Math.log(x)[/CODE] …

Member Avatar for Zaad
0
104
Member Avatar for kei01040

The way you are assiging is incorrect as what you are trying to do is evaluate whether [B]xx==x;[/B] which is a like used for conditions. For you to assign the value use only one "=" ex : xx=x; However i doubt it would work as there are no class variables …

Member Avatar for Zaad
0
109
Member Avatar for LiquidSolid

[QUOTE]Program and seem to be getting error's when trying to do things outside a class and stops the Program[/QUOTE] What is the error that you get?? [QUOTE]Vending machine should keep looping until Quit is typed[/QUOTE] For this what you can do is modify the code in the method [B]getUserInput()[/B] class …

Member Avatar for Zaad
0
164
Member Avatar for mikej39

[QUOTE]I have this code i compile it and it ran but nothing came up can someone help with this?[/QUOTE] You should call the necessary codes in the main method for it to execute. You have the main method in line 19 and the method is blank and that is why …

Member Avatar for Zaad
0
180
Member Avatar for queendaedra

Let me put it simply the try catch what you have done for the Id is correct a it would serve the purpose since you are expecting an integer and then if a person enters otherwise is given an exception. However the way you validate the name is incorrect as …

Member Avatar for Zaad
0
393
Member Avatar for queendaedra

You have posted this already here - [URL="http://www.daniweb.com/software-development/java/threads/387176"]http://www.daniweb.com/software-development/java/threads/387176[/URL] Only difference is with a different title. There is no point in opening new threads and wasting the members time. Continue with one thread for one question.

Member Avatar for JamesCherrill
0
155
Member Avatar for Hikari123

[QUOTE]but the problem is that it repeats the (1,-1 or 0) as many times as the loop itself [/QUOTE] It is because that you have included the print statement in the for loop and in each iteration it would print so. That is your logic. HOwever if you need to …

Member Avatar for Hikari123
0
124
Member Avatar for naomi_01

Yes the [CODE]r.nextInt(y)[/CODE] in line 22 expects a positive value. However shouldnt the condition [CODE]if (y>0){ y=x;} else y=1;[/CODE] be changed as [CODE]if (x>0){ y=x;} else y=1;[/CODE] Because I think that is what you are trying to do. Not to make y a negative value

Member Avatar for Zaad
0
183
Member Avatar for Nandomo
Member Avatar for Zaad
0
181
Member Avatar for ARaza110

The point u should really note is this that in the class [CODE]harada[/CODE] the variable left is another instance variable of [CODE]harada[/CODE] and when you pass in the insert of the else condition you are passing [CODE]hara.left[/CODE] which is not an initialized instant of the "harada" class. So it goes …

Member Avatar for ARaza110
0
171
Member Avatar for zmstevens

Define your variable.... Most of your variables are not defined. Ex in line 8 you have simply written [QUOTE]sales;[/QUOTE] You should define it ex : [CODE]Double sales;[/CODE] Likewise check all............

Member Avatar for Zaad
0
360
Member Avatar for nickliutw
Member Avatar for harsimran05

[QUOTE]FrmAdd is class in fd.java[/QUOTE] Note the class name and file name should be the same Ex: if class name is "ABCD" the file name should be "ABCD.java" Correct these and try again

Member Avatar for Zaad
0
184
Member Avatar for nagatron

In first code th reason it works is due to the fact that you are trying to convert it to an integer and catching the exception. This would happen even if the text field is empty as anything other than a number would throw the exception. In your if condition …

Member Avatar for nagatron
0
108
Member Avatar for gedas

Try this pseudo String[] array = split the string using the space as the delimeter. String finalResult = ""; Define a string buffer for loop length of array{ if(index equals 0 OR finalResult equals ""){ finalResult = array[i] }else{ if((length of finalResult) + length of (" " + array[index ])<20){ …

Member Avatar for Zaad
0
225
Member Avatar for mrjillberth

Firstly the program written is not able to handle any prime number entered, you should correct that ex: Try entering 5 ..... Also follow good coding standatrds where necessary - Like including braces And finding the numbers for a range would be easy using the logic.....

Member Avatar for mrjillberth
0
168
Member Avatar for Whilliam

You better have a look at your line 14. Here you are trying to access [CODE]subj.getString("name")[/CODE] where as you have not checked whether subj has a result from executing the query. Since you are using a conditionalized SQL you can use in line 14 like [CODE] if(subj.next()){ model.setValueAt(subj.getString("name"), 0, 1); …

Member Avatar for Zaad
0
116
Member Avatar for Episkey

I do not think the variable [CODE]maxElements [/CODE] would take the correct length for the array that you are expecting. As this is a multidimension array. However if you need only to assign the printed values to the array you created it could be done as follows. [CODE] public long[] …

Member Avatar for Episkey
0
248
Member Avatar for presley tonde

Well a friendly advice.... never ever limit yourself to one language as if you are able to learn more languages the better.... But what I would say is first whatever the language it might be try grasping the logics behind each and everything and in the end... You will be …

Member Avatar for Zaad
0
97
Member Avatar for prash.study

[url]http://www.dofactory.com/Patterns/Patterns.aspx[/url] [url]http://www.vincehuston.org/dp/[/url] Here are two good places to get a good idea but u can always google for more ;)

Member Avatar for Zaad
1
141
Member Avatar for Zaad

Hi; I have a problem which involves the road map of a certain country is given and I have to find the best solution to find a best solution for the map by demolishing the extra roads in the map and keep the roads that would make it possible for …

0
84
Member Avatar for anevins

Hey according to the programme that u have given the output is correct as Math.abs converts the negative value to a positive value and also the root that u will get as an output will be a positive value and if u cube a minus value u will get a …

Member Avatar for Zaad
0
157
Member Avatar for stahlsta210

Do these alterations and it will work Line 24 [CODE]System.out.println("The volume of the cone is: " + CylVol);[/CODE] and in line 34 [CODE]}[/CODE]

Member Avatar for Zaad
0
126
Member Avatar for eikal

Hey Its Better u check ur code again with the help of an IDE if u r not sure of the syntaxes as there are many syntax errors i ur programme.... Get rid of the syntax and better post it again...... And u dont write everything in the class.... See …

Member Avatar for Zaad
0
81
Member Avatar for Zaad

Hello; I am currently doing a project that involves the reading the data from a MS word document..... At present I am using the HWPFDocument library to read the text from the word document.... But I need a way to identify the [B]Title of the document when retreiving the data[/B]..... …

Member Avatar for Zaad
0
307
Member Avatar for tonief

Since you have declared Author[] au=new new Author[30]; in the Jbuttonactionperformed method it cannot be accessed by other methods as it is not a class variable so move this decleration to class level

Member Avatar for tonief
0
85
Member Avatar for 00darbo

getContentPane is not a method to be called to view but used for the getting the pane to add details.... So thee is nopoint of trying to view something using that method

Member Avatar for Zaad
0
70
Member Avatar for kerkquin

Hey let me know what loops u need to know about as there are some loops available ..... While loop , do while loop, for loop.... So be precise on wht u want

Member Avatar for sbhavan
-3
107
Member Avatar for riu

Well its seems simple as u see the sequence 11 21 22 31 32 That is after each execution of a line add 10 and then add on as usually did in the previous 1 12 123 that would help u out

Member Avatar for SQL_dba
-1
102
Member Avatar for Zaad

Hi Im developing a vending machine which have conneted to the bank server for card related transaction..... I have completed the coding and the system is working fine..... But I am required to apply concurrency to the system in fact controlled ones...... Is there anybody who has an idea where …

Member Avatar for Grn Xtrm
-2
97
Member Avatar for Zaad

Hi; Im on the way of doing a concurrent application in java command line. I want is a way to stop a transaction in the middle of it when the transaction is happening in the application. In the GUI there is the KeyListener to handle the key inputs and invoke …

-1
74

The End.