32,199 Topics

Member Avatar for
Member Avatar for alba07

Can someone help me fix this? After I compile I get ilegal start of expression for the line that says public String getBook(). I cannot see why this is not allowed. My output should be as follows: Jane Doe Long night 12.5 Long Night by Jane Doe I am supposed …

Member Avatar for alba07
0
52
Member Avatar for onsir

I have data in mysql database, i'm has succesful for connect, but how to show data in jTable. help to give me example with very detail, because i'm newbie in java progamming best regard onsir

Member Avatar for jwenting
0
66
Member Avatar for kapkan

Help me pls. I have some problems with method getClient(), bring only two classes. [code] package drugstore; public class DrugstoreFrame extends JFrame { Client person; ... public Client getClient(){ person.setAccount(getField(jTextField4)); person.setPassword(getField(jPasswordField2)); person.setFio(getField(jTextField5)); person.setAddress(getField(jTextField6)); person.setTelephone(getField(jTextField3)); person.setAdditionalInformation(getField(jTextField7)); return person; } private String getField(JTextField field){ return field.getText(); } public void jButton10_mouseClicked(MouseEvent e) { …

Member Avatar for peter_budo
0
82
Member Avatar for vishalkhialani

Hi, I am about to start learning java. I would like to ask which development tool is better. Eclipse or netbeans ? Thanks, Vishal

Member Avatar for iamthwee
0
89
Member Avatar for kaushalsahil09

please tell me how I can execute c++ program frm java I had tried this one but it does`t work /*import java.io.*; public class exe1 { public static void main(String[] arg) { try { Runtime rt = Runtime.getRuntime(); //int s=rt.availableProcessors(); Process prcs =rt.exec("inventry.exe"); InputStreamReader isr =new InputStreamReader(prcs.getInputStream()); BufferedReader br = …

Member Avatar for daninator09
0
625
Member Avatar for henryford07

public class Student { private String name; public Student(String nameIn) { name = nameIn; } public String getName() { return name; } public void setName(String nameIn) { name = nameIn; } } and i get this error Exception in thread "main" java.lang.NoSuchMethodError: main

Member Avatar for thekashyap
0
70
Member Avatar for pavani2006

1.WHAT IS THEDIFFERNCE BETWEEN LOCAL INNER CLASS AND NON LOCAL INNER CLASS? [B]2.Is there any tool in java that can create reports ? 3.?What is meant by a resource leak[/B] ?

Member Avatar for jwenting
0
77
Member Avatar for annduprey

/bold I am trying to find some Java web applications for a project in my class. I am unable to find any. Could someone help me please? :sad: Thanks!

Member Avatar for jwenting
0
56
Member Avatar for pavani2006

i want to find the lcm ,cant it be found without using gcd? class Gcd { int a,b; Gcd(int a,int b ) { this.b=b; this.a=a; } int gcd( int a,int b) { while(a!=b) { if(a>b) a=a-b; else b=b-a; return a; } } int lcm() { int l; if(a<b) l=(a*b)/gcd(a,b); else …

Member Avatar for iamthwee
0
117
Member Avatar for alba07

I have the following class and I am now supposed to add a parameter T, so that the value of Variable <T> is of type T rather than object. I am now lost with this and need some help. Not getting the generic classes. public class Variable { private Object …

Member Avatar for alba07
0
125
Member Avatar for bondo

I'm working on a program where I'm reading a file and I have to count the number of entries in the file. Each entry takes up a different number of lines, but each entry is also separated by a '#'. I'm wanting to read through the file and count the …

Member Avatar for iamthwee
0
110
Member Avatar for pavani2006

i want to find the second smallest number ib array but it is displaying second highest number int max=0,second=0; if(a[0]>a[1]) { max=a[0]; second=a[1]; } else { max=a[1]; second=a[0]; } for( i=2;i<n;i++) { if(a[i]>=max) { second=max; max=a[i]; } else if(a[i]>second) second=a[i]; } System.out.println("the second smallest nubmer is"+second);

Member Avatar for ajay_tabbu
0
161
Member Avatar for suneetha

hai friends my academic project is developing an editor for java. please tell me the code to compile and execute the java programme. waiting for ur reply please thanq

Member Avatar for Phaelax
0
119
Member Avatar for hamooihamoo

hi, every one. I want to develope an application similar to outlook express that is an e-mail client. i want to do it using Java but i don't really know how and what to use. I have been trying to find information on the internet and i came accross secure …

Member Avatar for hamooihamoo
0
74
Member Avatar for bkhojo

Can anyone out there please help me to implement a piece of software that is suitable to test the arithmetic level of kids. System should be able to allow more than one player at any time and produce a score for each particular user showing how many was answered rightly.

Member Avatar for peter_budo
0
45
Member Avatar for pointers

Hi, I am very new to java.....i know only c programming language.....even dont know c++ now i am getting training in java , i am confusing with oops concepts like polymorphism,inheritence etc. and java syntaxes all can u pls post a good link thst gives good command over oops , …

Member Avatar for indianscorpion2
0
80
Member Avatar for eeeman

"ListFiles.java": Duplicate definition of class milestonemyworkspace.ListFiles, defined in H:\SDI\MileStoneMyworkspace\MileStoneMyWorkSpace\src\milestonemyworkspace\ListFiles.java and also defined in H:\SDI\MileStoneMyworkspace\MileStoneMyWorkSpace\src\milestonemyworkspace\listFiles.java. The bugs says theres a duplicate class but as you can see on the image the files look normal. I have no idea whats wrong I tried deleting the class and repasting to another class but …

Member Avatar for jwenting
0
134
Member Avatar for compusaz

hi i am still a beginner and i am very interested in learning this language . what is the best i can do?

Member Avatar for jwenting
0
101
Member Avatar for eeeman

Hi Im am so far trying to get the Jlist in my gui to display all the files in my directory H:\SDI\MileStoneMyworkspace\MileStoneMyWorkSpace\users\abimar How can I do this. If you look I madde an attempt, tried to write files to object and list objects in J list. What am I doing …

Member Avatar for jwenting
0
138
Member Avatar for Newbie88

I have a class assignment that I am having a hard time to complete. I have started it but at ths point I am lost. Can someone help? This is what I should accomplish: 1. Create a new class called Cat that extends the PetRecord class 2. The new class …

Member Avatar for jwenting
0
82
Member Avatar for staneja

Well i am doing a very simple program that is to calculate the number of occurrance of a character in a string Hello World The character H appears 1 times The character E appaers 2 times The character L appears 3 times The character L appears 3 times The character …

Member Avatar for sun light
0
226
Member Avatar for arabbito

does anyone have an implementation of a slotted aloha scheme or know how i can implement it? i have data that i need to read in from a file about each packet that will be transmitted across the channel. any ideas? thanks.

0
48
Member Avatar for jehad

pleas help me i want acode that convert infex to prefix in java language heeeeeelp.

Member Avatar for Phaelax
-1
84
Member Avatar for eeeman

ListFile class takes care of writing the files to Jlist Basically there is a Jlist in my GUI and I want it to display the files stored in my user folder. But for some reason it doesnt work the Jlist say that there is Null file. [code = java] package …

0
85
Member Avatar for staneja

I was executing a simple core java application using JDK1.5 I wrote code and complied using javac it gave some errors that i fixed and at last it got complied successfully But when i tried to exeute it using java it gave me an error message Error in thread main.NoSuchMethodFound …

Member Avatar for vinod_javas
0
137
Member Avatar for jamesmurphy

I wrote a java program, it comprised of a file for the main class and a file that is a package that consists of a class, a subclass and some methods in each. The class, subclass and all methods are public. I compiled the main class and the package on …

0
66
Member Avatar for Metsfan147

Hi there. I'm trying to write some code to display a graph with nodes/edges on a LayeredPane that will allow the user to move the nodes around. However, I am having some problems getting my nodes to show up. Whenever I launch the application, I just get a blank window. …

0
66
Member Avatar for Cerberus

Hi, i've got a component that displays two JSpinners with a JOptionPane but the JSpinners are stretched across the dialog window. Does anyone know how i can format the JSpinners so they're smaller? Here's some of the code [code] import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.text.*; public class TComponent …

Member Avatar for Cerberus
0
410
Member Avatar for blufab

I am creating a DefaultSingleSelectionModel subclass. Is there anyway to discover what component is the owner of the model from inside the model?

0
55
Member Avatar for collegestuffs

Hello i have an important homework assignment which is due up on mon 26th and i need a competent java programmer with netbeans expirence. Problem is as follows: It's a small project and i have basically designed all the forms and buttons needed etc. Now i need someone to link …

Member Avatar for jwenting
0
675

The End.