35,618 Topics
![]() | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 - … | |
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`? | |
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 … | |
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 = … | |
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 … | |
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 … | |
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 } … | |
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 … | |
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 … | |
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 … | |
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. | |
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 … | |
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 | |
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 … | |
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 = … | |
//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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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. | |
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 … | |
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 … |
The End.