32,204 Topics
| |
write a Java program that performs the following task on an input text file. 1. Determine the number of characters 2. Count the number new-lines 3. Identify the number of empty lines. I have been working on this problem that I saw on the book and the part where I'm … | |
hey guys can anyone help me to build a java prog which does three sorting logics in the same prog and it can be any sorting and i m trying to do in all sorts one thing is i get is i m failing in it and guys thnks a … | |
Hello, I am stuck on this issue since like a week now and i have been trying to find out how to do this. I am trying to copy the ArrayList elements into another class. I have 4 classes: registration class (MAIN CLASS) address class (DONE) student class (DONE (kinda)) … | |
I need this program to take user entered information, check and see if the object exists and add it if it doesn't. I keep getting a nullpointer exception when trying to add an owner to an Arraylist. I've included the relevant part of the driver class, the OwnerParser class that … | |
I'm trying to build a program that has a user guess 4 random pegs in order. it needs to use arrays and methods and i'm struggling mightly... here are some parameters The structures must be declared as variables in the main() method. You must write your program so that the … | |
Hello, I am new to java and I was wondering if you guys could help me solve this problem: Your history instructor gives three tests worth 50 points each. you can drop one of the first two grades. your final grade is the sum of the best of the first … | |
The program has no errors and when ran will show the logo, buttons but not the inventory data. I have been working on figuring out why it will not display the cd information with no luck. Could use some fresh eyes to look at this and help me figure out … | |
Program created in BlueJ: For this Assignment I am to create a magic square from odd numbers >= 3 input by the user. I want to test my code to see if it works, but I can't figure out how to actually print the square from the number input by … | |
Ok im writing a program in java thats suppose to Use a while loop, to print the lower case alphabeth and its corresponding ascii values of the upper case alphabeth from Z to A So far i came up with while (counter +32) (char) (counter +32) if (counter < ?) … | |
For some reason my output is not showing right when I run it. I am showing the code and providing a screen shot of what it's doing. It's bunching lines together. [CODE]public void requestData() { System.out.print("What is the model number?"); modelNumber = scan.nextLine(); System.out.print("What is the camera brand?"); brand = … | |
Hello, I need assistance with this java program I am writing, Im trying to make two buttons and when you click the button, it has a counter, and everytime you click it it prints a message saying I was clicked n times. This is what I have so far and … | |
[I]Create a program called, Containment, that accepts three command line arguments, a file that contains a list of shapes, and a pair of numbers the specifies the (x,y) coordinates for a point. The program should print out the list of shapes, and a true/false value that indicates if the point … | |
I want the program to compare what the user puts in and then compare that string to something in an array and see if it is a match. Here is code for things already put into array [CODE]private static void createExistingUserData(Scientist[] scientist){ scientist[0] = new Scientist("user1", "password1"); scientist[0].setDob("02/02/1995"); scientist[0].setSsn("612-45-7070"); scientist[0].setApplicantName("Peter … | |
Hi guys, I just purchased SCJA exam simulator from whizlabs and i pass the final exam with over 92% but i'm still afraid to fail in the real exam. So, what else i need to do to ensure passing the exam?? Thanks | |
Just need someone to confirm that what ive done is good . It compiles but i need confirmation that its good and up to standards . this is the first class import java.io.Serializable; public class Flight implements Serializable { //instance variables private String flightNumber; private String day; private String destination; … | |
Hey I have this code: This is my main part of my program: [code=Java] import org.apache.commons.pool.ObjectPool; import org.apache.commons.pool.impl.GenericObjectPool; import Fecha; public class someclass { private GenericObjectPool<Fecha> fechapool; public boolean somefunction() { System.out.println("Im going to set set actives"); fechapool.setMaxActive(5); System.out.println("set actives sets"); } { [/code] It doest get to the "set … | |
Write a program that reads characters from the keyboard until a period is received. Have the program count the number of spaces and display it to the user. After that, ask the user if he/she would like to count a specific character. Terminate when the user is done counting the … | |
| Hello all, I have an assignment for one of my modules which involves writing UML Class diagram software which then outputs skeletal java code. The main window contains 3 things - a menu bar at the top, a panel on the left-side containing buttons and a draw area, where the … |
Hey guys, I am taking my first quarter of java at college and i'm having some difficulties with just 1 method for my current assignment. I wasn't planning on getting help, but I've been stuck on this for hours now, so i've decided to go to the pros. Here's what … | |
hey guys ive been given a peice of work which i totally forgot about, its due tomorrow and i have no idea what im doing, can any of you guys help me out there please, as i will be learning how to use java after i hand this work in … | |
If the class members declared public and the class itself is specified as default access ( Package access), then can the public members of that class be used in another package? I am asking this because .. as far i know class which is not specified as public cannot be … | |
[CODE]import sun.audio.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.io.*; public class Sample { public static void main(String s[]) { JFrame frame = new JFrame (); frame.setSize(200,200); JButton justin = new JButton ("Click Here for Welcoming"); frame.add(justin); justin.addActionListener(new AL()); } public static class AL implements ActionListener{ public final void actionPerformed(ActionEvent … | |
i dont know what mistake i have done here i could run the prog but i am not getting the o/p so guys pls help me and this is the coding if any corrections is need pls let me know and if possible change and send me the correct prog … | |
Hi everybody, I want to have some kind of a cursor in my program. My goal is: everytime when I write a getName() method I want it to return a next value. But the thing is I don't want to delete any elements befour. So please help me to give … | |
Hello! My friend recommended that I try this site if I needed advice on my programs, so I thought 'hey, why not?'. I'm working on a program that is to draw shapes and store them in arrays. I kinda can't figure out how to make my print functions work correctly. … | |
Hello, I was just wondering how i could write a TicTacToe program in java without arrays. I am new to programming and i don't know lot of stuffs, so any help would be appreciated Thanks | |
I runned my arithmetic operations with double data type and i got o/p for postive,negative and decimals nos and if i am using three pont decimal no(0.0005) means i am getting as (2.5E-7 & 4.0E-4) two diff nos and this is my code [ICODE]import java.io.*; public class arithmetic { public … | |
Modify the Inventory Program: Create a new method that calculates the value of the entire inventory. Create another method that sorts all of the array items alphabetically (ascending order) by the product name. o The application should declare and use an array to store 5 items. This array will represent … | |
This is my code for adding and removing from a binary tree but apparently its not complete can anyone tell me what to do to make it complete tree? [CODE] public void add(IBinaryTreeNode<E> e) { if (getRoot() == null) { setRoot(e); } else { //SAME HERE IBinaryTreeNode<E> node = getLastNode(); … |
The End.