32,204 Topics
| |
Hey everyone, I've searched around Google a bit but most places suggest just using "\n" over and over. This gets messy though, for the code and the interface. Is there a built in method for Java that can clear the console? | |
Hi, I am having problem understanding the below: 1) List a = new ArrayList(); 2) List <?> b = a; 3) List <? extends Object> c = a; // with warning of course Why there is an unchecked warning at clause 3) while no unchecked warning at 2) ? I … | |
Hello, I'm just starting to learn Java, and for a summation program that we started in class, I've been stuck on the question as to why this brings up an error message when I try to build it. Please advise me. [CODE]import java.util.Scanner; public class summation{ public static void main(String[] … | |
[CODE]import java.io.*; public class Prime{ public static void main(String[] args) throws IOException { BufferedReader jill = new BufferedReader (new InputStreamReader (System.in)); boolean isPrime = true; System.out.print("Enter number: "); int input = Integer.parseInt(jill.readLine()); if(input < 2){ isPrime = false; } if (input == 2) { isPrime = true; } if (isPrime) … | |
C:\Program Files\Java\jdk1.6.0_18\bin>javac -d ../bin rmidir\Chatserver.java rmidir\Chatserver.java:6: cannot find symbol symbol : class Chatclient location: interface rmidir.Chatserver public String[] login(Chatclient cc) throws RemoteException; ^ 1 error | |
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 … | |
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? | |
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 … | |
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 … | |
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 = … | |
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(); } … | |
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 … | |
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 … | |
[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 … | |
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 … | |
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> … | |
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 … | |
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 | |
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 … | |
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 > … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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? | |
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??? | |
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) … | |
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 :) | |
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.. |
The End.