32,199 Topics

Member Avatar for
Member Avatar for bhavna13

i need a code to merge two ordered list of objects of integers.the method should receive references to each of the list objects to be merged , and should return a reference to merged list object. pls help....

Member Avatar for masijade
0
171
Member Avatar for vs.vaidyanathan

When i run this, i get an error message saying TYpe expected and it points to the line having a.drive(100)... Any help please? Newbie... [code] class Car { public Car(){ int odometer=0; System.out.println("Car constructed!"); } public void drive(int miles) { System.out.println("Driving....."); odometer+=miles; } public long odometer; } class Guzzler extends …

Member Avatar for NormR1
0
253
Member Avatar for chris evans

hi, could sm1 please show me code that can sort and read text/string character by character into an array i.e identify integers and characters and put them in separate fields in an array e.g 2 integers then 3 characters like 23 IAM, 12 Her, or 32 MALE. it shuld also …

Member Avatar for NormR1
0
2K
Member Avatar for D boss

Hi guys i am working on a java car park simulation which controls the entry and departures of cars using the parking lot, the coding so far is below, but when i compile it i get 8 error messages, i have attached the errors message on the page...if anyone can …

Member Avatar for Zwien
0
1K
Member Avatar for onlyvidya

Hi frndz!! I am doing a final yr project named as Tracking keyboard,mouse,URL activity for security purpose. This is a research level project in computer science stream.plzz suggest me any ideas if u hv n hw to proceed further.what information is required or which sites,books or links should I refer.

0
60
Member Avatar for Roshan_Jain
Member Avatar for Wakesta
Member Avatar for bhavna13

I have written this code to determine duplicate words in the string. but its not working. plz help.... i am getting error in line 19.[code]import java.util.*; import java.util.Scanner; public class duplicate { public static void main(String[] args) { Scanner input = new Scanner(System.in); int n = input.nextInt(); System.out.println ("Input length …

Member Avatar for bhavna13
0
159
Member Avatar for beforetheyknew

Hi, sorry if this is an obvious question ive never written a java applet before. I'm looking to write a simple math questions program with a scanner input etc. Can you use a console via an applet? as in inbed within the website a form of console ? that the …

Member Avatar for NormR1
0
69
Member Avatar for gabec94

Hi, I just finished up AP Computer Science a few weeks ago and decided to write an app that allows me to quiz myself with vocab words and definitions, it works fine while I'm running it in IDE, but when I make it a JAR it refuses to open (I'm …

Member Avatar for gabec94
0
153
Member Avatar for mitch9654

Hi, I am trying to run an applet on a website, but when trying to access a file to write (reading works like a charm), do some wrapping: [CODE] try { FileOutputStream fos = new FileOutputStream("http://mitch9654.zymichost.com/songs.DAT"); OutputStreamWriter osw = new OutputStreamWriter(fos); BufferedWriter bw = new BufferedWriter(osw); } catch (FileNotFoundException e) …

Member Avatar for mitch9654
0
915
Member Avatar for circusfreak

Creating a program to read a text file full of words in alphabetical order. I then have to read it into a Linked List. The linked list should output total number of words, which I have managed to do. After this it needs to calculate the min and max depth …

Member Avatar for NormR1
0
135
Member Avatar for Umar Ali

Hello Guys I need help with adding new row in a JTable. I have created the JTable using Netbeans IDE under Swing Controls. Then I removed all the columns, so that I would add them manually. Now, the function GetFlightInfo() returns an ArrayList with n numbers of rows with 6 …

Member Avatar for Umar Ali
0
161
Member Avatar for haxin

hi..., im having set of points... i need to form a cluster of those points.... i will get another set of points ... and i have to check whether those set of points lies in that cluster or not. please help me how to cluster points i have.... thanks in …

Member Avatar for kivanc
0
241
Member Avatar for loveforfire33

Hi, i have got a popup box on a aspx page using JavaScript - what i would like to happen is after the user clicks the box for the browser to navigate to a different aspx page. i have tried using response.redirect and other methods - to no avail. i …

Member Avatar for loveforfire33
0
147
Member Avatar for mrblaze

Hi.. can anyone pls help me to write the source code for B+ tree and B tree. I would be thankful if anyone provide the full source code for AVL,Splay,B+ and B tree. Plz help me.

Member Avatar for leiger
0
101
Member Avatar for adams161

Hi, i got a jeditor pane working to display web links in my program. normal web pages display fine, and I got a hyperlink listener and that is working so they can click links. I use setPage("url as string");. what I'm noticing is if the page has pictures on it, …

Member Avatar for leiger
0
106
Member Avatar for joe_ojah

Hi Everyone, I am writing a program that i want to output some values from the database using a JoptionPane. I have the output using the System.Out.Println(), but i want a JOptionPane. Would anyone please Help.....??? This is what i have so far; st1 = con.createStatement(); rs2 = st1.executeQuery("select Block,Room,Bed …

Member Avatar for javaAddict
0
156
Member Avatar for Tyrone.Wilson

I have a program in which I have used a .myFileType file. obviously windows does not recognise the file type and so I have to browse for the file in the application. how do I make it so that windows knows .myFiletype's native application and launch the application on double …

Member Avatar for NormR1
0
142
Member Avatar for rojo821

my java programs are not running. actually they are running but the are invisible. I click on task manager and they show running. I actually click on the screen and you hear an error ding as if you are clicking on the window in a wrong spot. I have windows …

Member Avatar for stultuske
0
185
Member Avatar for sowmyacrao

Hi All, I want to create a manifest file through java program and wanted to capture the required parameters like excluding generated code , some of the legacy application through manifest file and wanted to generate autmoatically. If anybody have an idea about this kind of requirement do advice, Thanks …

Member Avatar for NormR1
0
33
Member Avatar for Alex_

Hello. That function worked fine firstly. Then i started to change some code, but nothing essential, just changing some variables to private class fields etc. I've restarted the OS , but has same output this is my code now: [code] doc = (AbstractDocument) jTextPane1.getDocument(); FileReader theFileIO = null; char[] c …

Member Avatar for Alex_
0
106
Member Avatar for monaprerita

[code]import java.awt.*; import java.awt.event.*; import java.applet.*; public class AL extends Frame implements WindowListener,ActionListener { TextField text = new TextField(20); Button b; private int numClicks = 0; public static void main(String[] args) { AL myWindow = new AL("My first window"); myWindow.setSize(350,100); myWindow.setVisible(true); } public AL(String title) { super(title); setLayout(new FlowLayout()); addWindowListener(this); …

Member Avatar for NormR1
0
1K
Member Avatar for jonoj

Hey guys :) I'm making a code and testing it in drjava but at this stage there is just one function I am having trouble with. Here is my code so far [code=java] import java.util.ArrayList; class Player { //instance fields, a name, a place, and an inventory String name; LocationID …

Member Avatar for JamesCherrill
0
156
Member Avatar for moman1981

I have been working on a tic tac toe game for a couple of days. And I just realize that I needed to do a GUI for it. With the following code, would it be fairly easy to add a GUI to this? and if so, what would be the …

Member Avatar for NormR1
0
356
Member Avatar for mahdi68

Hi is java suitable language for robot programming ( like line follower robots) ??? thanks

Member Avatar for NormR1
0
85
Member Avatar for abctoz

Hi All, I have created a CON, PRN folder([url]http://www.hoax-slayer.com/con-folder-name.shtml[/url]) using "md\\.\\c:\con " through DOS prompt, i was trying to create same CON and PRN folder through Java code using "Runtime.getRuntime().exec("md\\\\.\\d:\\con");" But it is giving following Exception : Cannot run program "md\\.\d:\con": CreateProcess error=2, The system cannot find the file specified …

Member Avatar for masijade
0
172
Member Avatar for ttboy04

Hello, My ouput is showing as... "1 2 3 (10)(23)(29)" when it should be... "1(10) 2(23) 3(29)" I don't think I am too far off. Here's the code and thanks in advance. // int[] Groups = {10, 23, 29}; in the constructor public String toString() { String tempStringB = ""; …

Member Avatar for ttboy04
0
105
Member Avatar for johndoe444

Hi, I am getting this exception: [CODE] javax.naming.directory.InvalidAttributeValueException: [LDAP: error code 21 - ob jectClass: value #0 invalid per syntax]; remaining name 'dc=jndiTest' at com.sun.jndi.ldap.LdapCtx.mapErrorCode(Unknown Source) at com.sun.jndi.ldap.LdapCtx.processReturnCode(Unknown Source) at com.sun.jndi.ldap.LdapCtx.processReturnCode(Unknown Source) at com.sun.jndi.ldap.LdapCtx.c_createSubcontext(Unknown Source) at com.sun.jndi.ldap.LdapCtx.c_createSubcontext(Unknown Source) at com.sun.jndi.toolkit.ctx.ComponentContext.p_createSubcontext(Unknown Source) at com.sun.jndi.toolkit.ctx.PartialCompositeContext.createSubcontext(Unk nown Source) at com.sun.jndi.toolkit.ctx.PartialCompositeContext.createSubcontext(Unk nown Source) at …

Member Avatar for johndoe444
0
142
Member Avatar for P00dle

The End.