32,204 Topics

Member Avatar for
Member Avatar for dorien

I am trying to run an easy Android ndk app in cpp, but I get UnsatisfiedLink Error for the Generate() function. Any help would be appreciated. I am quite fluent in c++, but my java is a little bit rusty. I have been trying a lot of tips from the …

Member Avatar for dorien
0
278
Member Avatar for GlenRogers

I have a TreeMap<String, Customer> (Customer is a class I have created). Customer objects hold a HashMap<String, Repair> (Repair is a class I created). I wrote a method to find a given Repair, this is it: public void processFindRef() { if(ref.length() == 6) // ref is the string we want …

Member Avatar for GlenRogers
0
170
Member Avatar for B204

Following code is for deleting elemnt from array but it shows NullPointerException at **if(names[k].equals(user))** ... how to remove it!!! public class del_array { public static void main(String s[]) { String names[ ] = new String [10]; names[0]="admin"; names[1]="b"; names[3]="m"; String user="b"; for(int k=0;k<names.length;k++) { if(names[k].equals(user)) { String item=names[k]; for(int j=k;j<names.length-1;j++) …

Member Avatar for stultuske
0
201
Member Avatar for ganges

hi friends kinldy suggest me a suitable version of linux os which is suitable for java,j2ee programming ,mysql and oracle thanking you

Member Avatar for godzab
0
94
Member Avatar for GlenRogers

**alue** I have a Customer class and a Repair class I have a TreeMap(customerDetails) of type <String, Customer>. Each Customer object holds a HashMap(repairs) of type<String, Repair>, the String represents the ref number of the repair. The user of my system types in a ref number, the program searches to …

Member Avatar for GlenRogers
0
110
Member Avatar for #include <lou>

Hi everyone I am trying to plot the data within the class XYDataset regress, vertically, right now they plot horizontally. Any help appreciated: package brainwavesanalyser; import java.awt.Color; import java.awt.Paint; import java.io.IOException; import java.util.ArrayList; import org.jfree.chart.ChartFactory; import org.jfree.chart.ChartPanel; import org.jfree.chart.JFreeChart; import org.jfree.chart.plot.DrawingSupplier; import org.jfree.chart.plot.PlotOrientation; import org.jfree.chart.plot.XYPlot; import org.jfree.chart.renderer.xy.StandardXYItemRenderer; import org.jfree.chart.renderer.xy.XYItemRenderer; import …

0
172
Member Avatar for Jdan2388

Hi, I am writing a game. Three card brag. The rules of the game are 1.Each player is dealt three cards. 2.The hand is then assigned a rank based on the cards recieved 3. The hand Ranks are 0,1,2,3 4. the hand ranks are then compared and the highest hand …

Member Avatar for Jdan2388
0
269
Member Avatar for magg93

I'm really confused with this! I have 2 classes, Club and Membership. In Membership I have the method, getMonth(), and in Club I have joinedMonth() which takes the parameter, 'month' - so a user enters a month and then I want it to return the Membership's which joined in that …

Member Avatar for magg93
0
543
Member Avatar for bobytch

Good day to everyone.. First Here is my code so far.. import java.io.*; public class Inventory { public static void main (String[]args)throws IOException{ BufferedReader bv = new BufferedReader (new InputStreamReader(System.in)); String x, z; boolean y = true; int a, b, c, d = 0; do { System.out.println("--------------------------------------------------------------"); System.out.println(" M I …

Member Avatar for NormR1
0
1K
Member Avatar for wuguo

I got the IndexOutOfBoundException in the following code. but I cannot find where went wrong. import java.util.ArrayList; public class sumArrayList { public static int calculateSumArrayList(ArrayList<Integer> Integers) { ArrayList<Integer> duplicate=new ArrayList<Integer>(); for (int i=1;i<=Integers.size();i++) { duplicate.set(i,Integers.get(i-1)); } return calculateSumArrayListHelper(Integers); } private static int calculateSumArrayListHelper(ArrayList<Integer> Integers) { //first: arrayList size 0 if …

Member Avatar for NormR1
0
141
Member Avatar for usernforce

I've been working through an excersise in a introduction to Java book by Deitel and I have a solution to a problem. The program will compile, but I get a message that says, "Exception in thread "main" java.lang.IllegalArgumentException: adding container's parent to itself" Can Someone please help me? Here is …

Member Avatar for godzab
0
1K
Member Avatar for Viped

Hi, I am trying to learn some basic game programming and already made simple pong game so I thought next step could be simple breakout. I already got ball and bat made by Rectangle. How about bricks, also Rectangle? If so it would be easy to break them just by …

Member Avatar for Viped
0
140
Member Avatar for paramv

Hello everyone,I need some good practise problems in java programming so that i can apply concepts in solving the problems.So any help would be much appreciated.Please refer me to any link or suggest me some book for the same and also I am new to this website so forgive if …

Member Avatar for paramv
0
158
Member Avatar for wallet123

hey guys i have done my codes and its working properly the only thing that's bothering me is that' when i input 52 and 'a' as my name, it wont ouput the right answer (it should be 'a' also) i hope you guys can help me thanks! public static void …

Member Avatar for JamesCherrill
0
137
Member Avatar for iEpic

This is driving me crazy. I downloaded netbeans and love it but for the last 5-6 hours i have been trying to figure out why my java programs is not showing images. When i open it with jGrasp the images and everything loads perfect. With netbeans it will not show …

Member Avatar for NormR1
0
242
Member Avatar for iEpic

The code i used in JGrasp to show the image is not working in Netbeans The code i used in JGrasp is final ImageIcon icon1 = new ImageIcon("image/money.gif"); JOptionPane.showMessageDialog(null, " blah blah", "Text", + JOptionPane.INFORMATION_MESSAGE, icon1); And if i wanted to show an image in JOptionPane.showInputDialog would it be the …

Member Avatar for NormR1
0
4K
Member Avatar for kannan_pahang

You are required to write an application called Customer Billing System. This system will calculate water usage charges for a month that has been imposed by Syarikat Air Melaka Berhad. This system will categorise users into residential users and industrial users and calculate the charges based on data entered by …

Member Avatar for Wazzza95
0
470
Member Avatar for Boyd_

I want to start a collaboration with just 1 Java programmer (intermediate or pro) for building our own graphics library . I have tools for real-time collaborative code editing (a plugin for eclipse), so you don't have to worry about uploading your code on internet and then I have to …

Member Avatar for JamesCherrill
0
195
Member Avatar for kannan_pahang

class Student { // data members private String _studentNumber; private String _studentName; private int _markForMaths; private int _markForEnglish; private int _markForScience; // Set Student Name public void setStudentName(String studentName) { _studentName = studentName; } // Set the student number public void setStudentNumber(String studentNumber) { _studentNumber = studentNumber; } // getNumber() …

Member Avatar for JamesCherrill
0
126
Member Avatar for c.pentasuglia

I'm trying to parse an XML file in Java using the XOM library. Where i'm running into an issue is when i hit nested elements. So in XOM you start with a root node, and i am able to parse the attributes out of that root node, and the three …

Member Avatar for ~s.o.s~
0
114
Member Avatar for sammoto

I'm trying to add the int values of Integer objects within an ArrayList, using a recursion (for the first time). Here's what I have so far: import java.util.Scanner; import java.util.ArrayList; public class SumArrayList { private static int calculateSumArrayListHelper(ArrayList<Integer> duplicate) { if (duplicate.size() == 0) { return 0; } int lastNum …

Member Avatar for curiousgeorgem
0
3K
Member Avatar for sammoto

Hi again, I posted last week about a Go Fish game that I was trying to write - well I've sorted out my past issues and now I'm trying to rewrite my CardPile class (that defines such things as the deck or a player's hand) to consist of an ArrayList …

Member Avatar for sammoto
0
442
Member Avatar for pendo826

0 down vote favorite I am currently making an application to store employee details such as name, id and email address. I am doing this using a HashMap. I am currently having difficulty with a searchByName,id and email address methods. How would i go about writing one ? Here is …

Member Avatar for JamesCherrill
0
1K
Member Avatar for kannan_pahang

Create a class named Student (class definition program). The class contains: • Private attributes to store values of Student name, Student university and Student mark. • A method named initialize() to assign initial value to the Student name, Student University and Student mark as specified in the parameter. • A …

Member Avatar for JamesCherrill
0
101
Member Avatar for efth

I recently left Python behind to pick up Java. In Python, a variable defined in a function could not be called outside of the function. But you could at least let the function return a value, which could be a variable defined in the function. When a variable is defined …

Member Avatar for jLocke
0
250
Member Avatar for Viped

Hi, I have a external class with paint(Graphics g) method and the class itself is working great. I can get it visible by launching it from my launch class by doing add(new Laatikko()); but when I am trying to get it work from third class it wont show up. Basicly …

Member Avatar for Viped
0
286
Member Avatar for Massa3332

public class QueueAsArray implements Queue { protected int[] myArray; int count, size, rear = 0; public QueueAsArray(int newSize) { myArray = new int[newSize]; size = newSize; count = 0; } public void purge() { int index = 0; while(count > 0) { myArray[index] = 0; index++; count--; } rear = …

Member Avatar for JamesCherrill
0
213
Member Avatar for salmansaifi7

when i call the function as System.out.println("Hi..."+i+"Welcome"); where i initialized the value of i as i=50; when this statement is executed, how that function is called... is it called in the way as Sop("hi..."); Sop(i); Sop("welcome"); **please help to understatnd the working..*

Member Avatar for Schol-R-LEA
0
79
Member Avatar for iEpic

For my final project I have to develop a functional flowchart and write a menu-driven Java program, using control constructs and user-defined functions. My question is, what the heck is a menu-driven program?

Member Avatar for godzab
0
551
Member Avatar for gedas

hey guys i found a cool java app that helps me manage my svn directories, you can find it by following this link: http://just-download.com/software-development/other/svncontrol-1.62.zip/12a97 i was wondering whether this is an open source and whether i can get a source code for it as i would like to extend it …

Member Avatar for pritaeas
0
53

The End.