35,618 Topics

Member Avatar for
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
509
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
181
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
295
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
118
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
121
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
248
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
484
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
883
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
701
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
206
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
244
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
303
Member Avatar for Sudhanshu_2

hi ! i ve just started doing mysql. i am making a web application in which employees database is reqiured to be shown in the table. i ve made a database name "educrm" and table name is "info", which i ve done in mysql through xampp(phpMyAdmin). i am showing u …

Member Avatar for Sudhanshu_2
0
343
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
299
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
155
Member Avatar for vibhuti@sharma

hi everyone recently I made a jsp website as a part of my minor project now my clg wants me to host it ,since i am very new to all this i dont know how to do it ...actually I also want that my website should also be connected to …

Member Avatar for rozermartin28
0
181
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
308
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
272
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
442
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
221
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
583
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
203
Member Avatar for farwajafri90

Hi everyone I have a question and I need your help I want to sort an array but I dont want to change the index I mean if I have an array Array[6,5,4,3,2,1] it will be like this 0 6 1 5 2 4 3 3 4 2 5 1 …

Member Avatar for jwenting
0
261
Member Avatar for Pyler

Suppose I have the following generic classes; Queue<T> KellysCoffee CheckOut and the following generic interfaces QueueInterface OrderLineInterface Suppose I want `KellysCoffee` to extend Queue class and implement `OrderLineInterface` This is how I've done it private class KellyCoffee<Order extends Queue<Order>> implements OrderLineInterface{} Now when I try to implement `CheckOut` public class …

Member Avatar for Pyler
0
297
Member Avatar for jwenting

Similarly, you can add more fields to an enum and simply provide accessor methods to retrieve them. For example you could change it to have an extra field indicating an output directory to write specific types of data to, and a getter method to return that directory.

Member Avatar for jwenting
0
247
Member Avatar for xrerd

i was tasked with writing a program that prints the question ”Do you want to continue?” and reads a user input. If the user input is ”Y”, ”Yes”, ”OK”, ”Sure”, or ”Why not?”, print out ”OK”. If the user input is ”N” or ”No”, then print out ”Terminating”. Otherwise, print …

Member Avatar for jwenting
0
2K
Member Avatar for sobias

Hello guys, I'm completely losing it. The question asks to emplement an electronic directory traverse in size a chosen folder (using JFileChooser)and print the structure with the calculated the size of each folder and file. Finding the file size is easy using File.io `getSize()`. However, to find the size of …

Member Avatar for JamesCherrill
0
311

The End.