32,199 Topics

Member Avatar for
Member Avatar for server_crash

I've looked and looked for some good material on this exception, but I can't find anything helpful. I just don't understand it. It's suppose to be caught or thrown whenever a method is called when not suppose to be...But won't other exceptions be caught or thrown in it's place? If …

Member Avatar for GoogleException
0
194
Member Avatar for vishalbhavsar

Hi, I am trying to write a program having file handling. In it, I write an object in a .dat file. Is there any mechanism to read a specific object from a file? Is there any method like 'fseek()' as provided in C?

Member Avatar for JamesCherrill
0
175
Member Avatar for chiiqui

Hi guy how do I randomize these numbers inside this arrays? [CODE] private double amounts[] = { 0, 0.01, 1000000, 25, 250000, 75, 50, 1000, 200, 100, 400000, 750, 5000, 750000, 500, 100000, 300, 75000, 800, 20, 300000, 10, 50, 750, 25, 5, 1 };[/CODE] I want to randomize them …

Member Avatar for JamesCherrill
0
178
Member Avatar for harsimran05

i hav created a combobox and add elements to it from database . combobox contain elements lyk 1-2year,12 months,5-9years, means numeric as well as text. but now i want to extract only numeric data from it as 1-2 year or12 months. so plz suggest any code tht can retreive only …

Member Avatar for JamesCherrill
0
74
Member Avatar for chiiqui

Can anyone help me with this? or alter the code of mine when it comes to the user Input here's the block of code of mine [CODE]public int Remove(int i, Briefcase c[], String[] m) { int nChoice = 0; System.out.print("\tPlease remove " + i + " cases: "); nChoice = …

Member Avatar for chiiqui
0
3K
Member Avatar for harsimran05

im tr table only 2 column exist , first1 time period of text type nd 2nd is rate ,i.e also text type,my code is [code] try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con=DriverManager.getConnection("jdbc:odbc:DRIVER=Microsoft Access DRIVER (*.mdb);DBQ=trrelation.mdb"); String tp=(String)mTimePd.getElementAt(cTimePd.getSelectedIndex()); PreparedStatement ps=con.prepareStatement("select Rate from tr where TimePeriod=?"); ResultSet rs=ps.executeQuery(); ps.setString(1,tp); while(rs.next()){ tRate.setText(rs.getString(2)); } con.close(); } …

Member Avatar for JamesCherrill
0
80
Member Avatar for pro_learner

I want to browse & upload file to a folder.How can i do that in java.I can browse for a file.This is the code that i used.... [CODE] JFileChooser chooser = new JFileChooser(); chooser.showOpenDialog(null); File file = chooser.getSelectedFile(); String filename = file.getName();[/CODE] Plz tell me how to upload a file …

Member Avatar for JamesCherrill
0
536
Member Avatar for Whilliam

Hello guys, I am very new to Java. I've been trying to select two different tables but fails. The error is "Invalid operation at current cursor position.". Here is my code. [code] private void display() throws SQLException{ TableModel model = schedTable.getModel(); PreparedStatement stmt = con.prepareStatement("select * from APP.SCHEDULE"); ResultSet sched …

Member Avatar for Zaad
0
115
Member Avatar for slasherpunk

[CODE]class MyThread1 implements Runnable { Thread t; MyThread1() { t = new Thread(this);//create a Thread t.start();//activate the thread } public void run() //override run() of Runnable { int i; for(i =0; i< 1000; i++) System.out.print("*"); } public static void main(String args[]) { MyThread1 m1 = new MyThread1(); int i; for(i …

Member Avatar for JamesCherrill
0
170
Member Avatar for ITHope

I am using java to create a program that gives the user the option to either add two numbers multiply two numbers or see if the 2 numbers are equal this is what i have so far. I know hot to the menu option so that is ommitted. how can …

Member Avatar for dimasalang
0
244
Member Avatar for jeraldmuthu

In this class for each case i'm generating XML (XML creation code is in last) in Xhtml i added javascript [CODE] <tr> <td align='center'> <div id="chart1Div"> This text is replaced by chart. </div> <script type="text/javascript"> var chart1 = new FusionCharts("Charts/MSColumn3D.swf", "ChId1", "600", "600", "0", "1"); chart1.setXMLUrl("Charts/test.xml"); chart1.render("chart1Div"); </script> </td> </tr> …

0
91
Member Avatar for marsh_mallows11

Guys any idea how to implement the said code... Implement the IMultiSet interface below into MultiSet class [code] public class IMultiSet{ // add x to this multiset (x must be 0-9) void add(int x); // remove x from this multiset if there are occurrences of element x (x must be …

Member Avatar for NormR1
0
571
Member Avatar for ITHope

how can i search a database lets say the police database for felons that they have online is there a way to manipulate the code to do that

Member Avatar for ITHope
0
81
Member Avatar for glamourhits

Everything is correct, no errors! I dont know How to implement the (20.0%) and the (9.0%) in the Deductions area.[/b] Thanks in advance. [b]Write a program that reads the following information and prints a payroll statement: Employee's name Number of hours worked in a week Hourly pay rate Federal tax …

Member Avatar for glamourhits
-1
161
Member Avatar for Stjerne

Hello guys, I've recently started programming in Java, and I need help with one "assignment" that I found on one of our universitys website (Norwegian). It's like this ( I will translate as good as I can, please leave a message if you don't understand ): [CODE]< necessary import-packages > …

Member Avatar for peter_budo
0
109
Member Avatar for Rivka Schwartz

Hi , In the next month i will be involved in java project that deal with the changes of code that depends on some upgraded version . I am a student so i have never seen before upgrade code ,I really want to understand how the upgrade work , what …

Member Avatar for Rivka Schwartz
-1
170
Member Avatar for gispe

Hi all, Im starting to program in java with sql. The problem im having is that when im trying to complete a combo box with data from a table in sql i get this error: [U]"null error in cargarComboProvincias()"[/U] when i run the program, and i cant find the error …

Member Avatar for Ezzaral
0
163
Member Avatar for darwin_nacional

Hi. Well, I am able to program in Java and connect it to MS Access and be able to distribute it as long as I have the *.mdb file together with the *.jar file. Now, I want to have my database on MySQL. I am already able to do it …

Member Avatar for Ezzaral
0
152
Member Avatar for PHkiDz

Here is my code so far and i`m editing it and adding some code, is there some one might tell me that this is the right way of coding list in permutation. This program is not yet complete. [CODE]package man; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.LinkedList; public class …

Member Avatar for NormR1
0
177
Member Avatar for billingsj09

I am still somewhat new to Java programming and I have been given an assignment that asks to read names from a file and print them out that start with a letter lexicographically less than or equal to M followed by all of the names that start with a letter …

Member Avatar for NormR1
0
195
Member Avatar for Duki

Hey everyone, I've never used eclipse or java, and I have an assignment that is expected to use the XML encoding/decoding functionality. I've searched google a bit, but can't really find a good example. Does anyone have a link to some snippets or something that I could go by?

Member Avatar for JamesCherrill
0
218
Member Avatar for Mylo92

Just unsure regarding which data type can store data such as multiple language code e.g. English:EN, Chinese:ZH, Malay:MS and even more, is LONGVARCHAR an option???

Member Avatar for JamesCherrill
0
88
Member Avatar for mozy1691

i have a project which am half way done but on compling ma code it shows errors i need help to clean it on login it should display a new JFrame with three labels and five buttons with actions when the book id is entered it should retrive the book(bkbtn) …

Member Avatar for NormR1
0
227
Member Avatar for reemhatim

this the first time i create an applet program i want to know how to open a new project to create an applet program thank you :)

Member Avatar for JamesCherrill
0
52
Member Avatar for debasree

Class.forName(“com.ibm.db2.jcc.DB2Driver”); getConnection Connecton connecton=DriverManager.getConnection(“(“jdbc:db2://x.x.x.x:x/WT”, “x”);“x”, “x”); PreparedStatement ps=connection.prepepareStatement(sql); // sql: //ja//java.Stringva.lang.String Need Help..

Member Avatar for javaAddict
0
35
Member Avatar for taga1989

M just an infant to java..just kno the ABC.. m tryin to work in small projects like address book...so can i get help like how to start...

Member Avatar for muthu@tent
0
151
Member Avatar for maverick420

[CODE] import.awt.Rectangle; public class AreaTester { public static void main(String[] args) { Rectangle R = new Rectangle(5,6,7,8); System.out.print("w: "); int w = R.getWidth(); System.out.println(box.getWidth()); System.out.print("h: "); int h = R.getHeight(); System.out.println(box.getHeight()); int area = w*h; System.out.println("Area of Rectangle:"+ area); } } [/CODE] The above code gives error:<identifier> expected import.awt.Rectangle; ^

Member Avatar for dimasalang
0
528
Member Avatar for willywhomperz

[CODE] package code; public class CharacterCounter { /** * int numberOf(String s, char c) * * Returns the number of time the char c occurs in the String s * * @param s is the original String * @param c is the char whose count in s we want to …

Member Avatar for dimasalang
0
408
Member Avatar for isebas

Yes, I am a total newbie. I am doing this code for homework. It is giving me an error on the method line is saying that it is missing.Please help. [CODE]import java.io.*; public class discount {public static input in = new input(); public static void main(String[] args) throws IOException; {double …

Member Avatar for dimasalang
0
195
Member Avatar for Satyrn

I am trying to simplify Maven to use one POM to do both a 64 bit build and a 32 bit build. I have tried to separate the build into two separate executions however I am required to set the compilerExecutable tag specified by the maven-native-plugin to point to either …

Member Avatar for Satyrn
0
390

The End.