32,199 Topics

Member Avatar for
Member Avatar for Yousif_3

Hello, I am making a small application to access WEKA code in Java for Machine Learning. In the code I should specify a data file to work on and mainly it is an Arff file. How to use a file that the user has uploaded/opened or chosen ?

0
80
Member Avatar for teitsu

package userinput; /** * * @author CHIEF_OGUNDE */ import javax.swing.JOptionPane; public class Main { /** * @param args the command line arguments */ private static void show(string, "Not Yet Implemented"); public static void main(String[] args) { // TODO code application logic here int ERROR_MESSAGE; String first_name; first_name = JOptionPane.showInputDialog("First Name","Enter …

Member Avatar for stultuske
0
198
Member Avatar for Reapt

Using netbeans IDE 8.0, and have JDK 1.8. Created a project and file that does this. public class Tutorial { public static void main(String[] args) { // TODO code application logic here system.out.println("Hello World!"); } } and when running i get this error... Exception in thread "main" java.lang.RuntimeException: Uncompilable source …

Member Avatar for JamesCherrill
0
361
Member Avatar for Raymond_3

10) A statement that creates invokes findAll() based on the argument 8 and assigns this to a new array 11) A print statement that prints out the array created in the above step. Which i did with the following bit of code in my driver ArrayMethods arrayTwo = new ArrayMethods(); …

Member Avatar for John Code
0
166
Member Avatar for parsa123

i write code with class f that have constructor : public f(int number){ this.number=number; } i want to write method that get one f then add it with f which the method was called on it public void add(f number) { //the code } what is the code????

Member Avatar for Doogledude123
0
159
Member Avatar for jalpesh_007

Dear all, I am developing SOAP web service using netbeans. As i have got preferred SOAP request and SOAP response,now i want to add security information like username and/or password in my SOAP header Request. Please tell me how can i modify or add username in my SOAP header Request …

Member Avatar for Ewald Horn
0
3K
Member Avatar for mrabrar09

here where am doing mistake and program is showing error non static method cannot be refferenced to static context

Member Avatar for mrabrar09
0
218
Member Avatar for ezkonekgal

hello. I need some help on our implementation on lines of code program. here's the algorithm we have: 1. The LOC program will start by asking for the filename of the program to be counted. 2. Browse for the filename of the program to be used. 3. The contents of …

Member Avatar for emoon11
0
2K
Member Avatar for Emelnuel

I need the specification and implementation of a new data type that holds terms extracted from document(s). Such a data type will not allow duplication of terms in each instance. A minimum of: 1 creator method, 3 mutator methods, 3 observer methods are required. Also,a separate test program is to …

Member Avatar for Emelnuel
0
507
Member Avatar for SoloMonk

I am trying to figure out how to center the labels labeled blackSection, blueSection and so on. However i am unable to get the labels to center. I have tried blackSection.setVerticalAlignment(JLabel.CENTER) also have tried blackSection.setVerticalTextProperty(JLabel.CENTER). Any help would be appreciated, it is however a homework assignment so hints as to …

Member Avatar for SoloMonk
0
2K
Member Avatar for Doogledude123

Does clear use removeAll method for listViews? I have a program that reads a file and stores the data in multiple arrays. I then use that data from the arrays to display them in a ListView, TextFields, a ComboBox, and a TextArea. I am also using an ActionListener to get …

0
179
Member Avatar for nabilmahesaniya

hey friend i got a project for bank account which consists fo two child class(saving and current account) i had completed with saving account but in current account i need to have a method type which help me for exrtract money(credit which bank gives us ) example:- if i have …

Member Avatar for nabilmahesaniya
0
291
Member Avatar for xolani.ntsiba.7

Create a class called Classroom which contains the main method. This class creates an array of 5 students and calls the setName and setAverage methods. Using the console, send in a name and average for every student. Create two integer variables called a and b. a gets a random value …

Member Avatar for stultuske
0
115
Member Avatar for Xabush

I have been using IntelliJ IDEA IDE for java development for about a year.However, recently I started working on the J2ME platform.However,when using the Oracle J2ME SDK as my project sdk, I can't run a MIDlet.It is working in netbeans but not IDEA.it shows me the following error: `ERROR - …

0
120
Member Avatar for Pyler

What is the difference between `CoffeeInterface<Beverage> cup1 = new Coffee<Beverage>()` and `Coffee<Beverage> cup2 = new Coffee<Beverage>()` `Coffee` is a class that extends the `CoffeeInterface` Is `cup1` an object or can it be used as one. Are there any differences betweeen `cup1` and `cup2`?

Member Avatar for JamesCherrill
0
245
Member Avatar for Doogledude123

I am trying to determine collision in a 2D Side Scroller environment using Rectangles. However, the way most people do it is to get the bounds of the Tile. I do not use Tile's in this case, I am just drawing Simple Full Colored Rectangles using Graphics2D. `g.drawRect(int x, int …

Member Avatar for jwenting
0
481
Member Avatar for mellixa

I cant figure out how to check the array for AND and OR. please, help, i got stuck my code: import java.util.Scanner; public class BooleanProduct import java.util.Scanner; public class BooleanProduct { public static void main(String[] args) { Scanner input = new Scanner(System.in); int[][] A = new int[10][10]; int[][] B = …

Member Avatar for JamesCherrill
0
882
Member Avatar for Doogledude123

Okay, so I have a ListView populated by an Array, which is populated by a text file. I also have 3 TextBoxes which are changed to different values in multiple Arrays using the Selected Index. My problem occurs when reloading the ListView after saving the text file. The values from …

Member Avatar for JamesCherrill
0
696
Member Avatar for yay604

i play games that need java to run the games yesterday they all worked fine today none of them work my wife used the computer while i was asleep last night and she gets alot of viruses on the computer sometimes idk how but thats not my problem atm i …

Member Avatar for gerbil
0
199
Member Avatar for Pyler

I have two classes A Dog class whose constructor does not accept arguments, `public class Dog<pet> extends Animal<pet>{}` whose constructor does not accept any arguments and `public class Animal<pet>{}` whose constructor accepts one argument public class Dog<pet> extends Animal<pet>{ public Dog(){ super(/*what should go here?*/); //Constructor accepts no arguments } …

Member Avatar for stultuske
0
241
Member Avatar for mellixa

import java.util.Scanner; public class BooleanProduct { public static void main(String[] args) { Scanner input = new Scanner(System.in); int n = 10; int[][] A = new int[n][n]; int[][] B = new int[n][n]; //Fill A and B int m,n2,p,q; System.out.println("Enter number of rows for matrix A : "); m = input.nextInt(); System.out.println("Enter …

Member Avatar for stultuske
0
302
Member Avatar for PeterSodborg

Hi There. Im doing a beginner project here in my studie. So here is the thing. I have a txt file, where there are words in different language. The user must quess the word in his language and if he dosen´t know the word, he should search for it. I´ve …

Member Avatar for PeterSodborg
0
269
Member Avatar for Pyler

I have two strings, `String one = new String("word");` `String two = new String("word");` Why does `System.out.println(one.equals(two));` Return true given that one and two are two different `String` objects.

Member Avatar for jwenting
0
154
Member Avatar for ckide

what do you prefere for naming: database - c++ - java - php? 1- User_id - User_Name 2- user_id - user_name 3- UserId - UserName 4- userId - userName 5- else

Member Avatar for Ancient Dragon
0
305
Member Avatar for Totoo

hi can u please help me solve this question. A small company dealing with transportation has just purchased a computer for its new automated reservations system. You have been asked to program the new system. You are to write a program called ReservationSystem to assign seats on a vehicle. Your …

Member Avatar for Ancient Dragon
0
270
Member Avatar for DawnofanewEra

Can anyone pointed out what is wrong with this code. I got an annoying error something with Scanner method. import java.util.*; import java.io.*; //import java.lang.System.*; public class cTedit implements ICommand{ @Override public void Execute() { InputStream istream; OutputStream ostream = null; int x; final int EOF = -1; istream = …

Member Avatar for jalpesh_007
0
4K
Member Avatar for software girl

//hello.java import java.rmi.*; public interface Hello extends java.rmi.Remote String sayHello() throws RemoteException; } //HelloImpl.java import java.rmi.Naming; import java.rmi.RemoteException; import java.rmi.server.UnicastRemoteObject; public class HelloImpl extends UnicastRemoteObject implements Hello { public HelloImpl() throws RemoteException {} public String sayHello() { return "Hello world!"; } public static void main(String args[]) { try { HelloImpl …

Member Avatar for jwenting
0
441
Member Avatar for code_flea

I have a source code here that counts the frequency of alphabetic characters and non-alphabetic characters (see the source code below). import java.io.*; public class letterfrequency { public static void main (String [] args) throws IOException { File file1 = new File ("letternumberfrequency.txt"); BufferedReader in = new BufferedReader (new FileReader …

Member Avatar for Alberto Bucur
0
216
Member Avatar for koduruabhinav

Hi All, I am new to webservices.I am using eclipse,tomacat6 and axis2. When i was converting a class to webservice upto WSDL creation was done.After that i was getting error like [B] IWAB0014E Unexpected exception occurred.[/B] and details are[CODE]IWAB0014E Unexpected exception occurred. The char '0x0' after 'return code: 502 <HEAD><TITLE>Connection …

Member Avatar for JamesCherrill
0
581
Member Avatar for souad

I have this code that outputs the tfidf for all words in each file in the directory. I'm trying to transfer this to a matrix where each row correspond to each file in the directory and each column to all words in the files and I have some difficulty in …

0
200

The End.