32,199 Topics
| |
HI, so my code compiles but does not give the result I intended. Any help is greatly appreciated! How can we count the number of occurrences of a character or group of characters (a substring) inside of a given string of characters? In other words, how can we count the … | |
HI, so my code compiles but does not give the result I intended. Any help is greatly appreciated! public class SubstringCounter { public static int substringCounter(String master, String substring) { int count = 0 ; for(int pos = 0 ; pos < master.length() ; pos++) { int index = master.indexOf(substring, … | |
How can implement a perfect hashed data structure using the four basic operations? Could I do something like this or do I need to break up my code into two different classes and then test the methods from another class's main method? public class PerfectHashed{ int ticketNumber; // keyfield String … | |
Write a java program that asks a person for his height (in meters) and weight (in kilograms) and outputs one of the messages: underweight, normal, or obese, using the BMI formula and BMI classification. Body Mass Index (BMI) is an index used to measure the body fat using the height … | |
We have a flex project which called from browser by using a swf file. After flash update the swf file is disabled. Here are the list of flash versions and browsers that we used in windows 7 OS. * Installed Firefox 56.0 - NPAPI 25.0.0.170 version in Firefox . - … | |
please help me, create an algorithm that can be used to spell out a positive number worth less than 1,000,000 and create a c ++ program for the algorithm | |
Hello everyone hope you are doing well, i was busy these days i was having problem with the police in my country, they catch me smoking weed and now i got criminal record... but never mind that i hope will be better in the future. So i got in mind … | |
Can you please Create a student database in java using string and arrays wherein we can store details of students Like their ROLL no, Name, Father's Name,DOB, Section and then also search a student using his DOB or Roll No. or Name? | |
or how use jdatechooser into a if else statement thank you for response guys | |
I've come across a little problem. How do I make it so that after my game is finished, I can choose whetever to exit my program or just restarting it from the beginning. In main method I've started my while loop to check my tries left if my counter is … | |
Good man James helped me learn die roll board game programming in Java, and I applied it on Ladders and Snakes. Made one in Java. Now I'm learning to do it in Android. Here's the question: Making simple Ladders and Snakes game. Can't use those in Google Play, they don't … | |
hi this is one of my assignment that I have to do. it is a triangle calculator. everything well with it but it just the calculation. when I run it, it gives a zero output. I think it may be my calculation. can someone take a look at it and … | |
hi james cherril I am doing a voting system application of which I have to hand up today. I am getting a runtime error when I entered a record and try to save it. as I entered one record and when the save button is pressed it give me a … | |
So when I run my code I get a bug where it doesn't display the name for the person when displaying the scores: ![Screen_Shot_2017-10- ![Screen_Shot_2017-10-22_at_8_55_08_AM.png](/attachments/large/4/db8f249841da73d8654d7c6ea699aa03.png "align-center") Here is my code, I have been stumped for several hours: import java.util.Scanner ; public class StudentApp { public static void main(String []args) { … | |
So I get an error that says "no suitable constructor found for Student(no arguments constructor)" /** * Write a description of class Student here. * * @author (your name) * @version (a version number or a date) */ public class Student { private String name ; private int test1 ; … | |
import java.util.Scanner; public class LuckySevens { private int diceLength; private int rolls; private int sides; private int numRolls = 0; public static void main (String [] args) { Scanner reader = new Scanner(System.in); int diel, die2, dollars, count, maxDollars, countAtMax; System.out.print("How many dollars do you have? "); dollars = reader.nextInt(); … | |
I am working creating a fully encapsulated, homogeneous singly linked data structure. The Listing class and SinglyLinkedList class that are part of the whole application compile fine, but the problem that I am having is performing different operations such as insert, fetch, update, and delete inside of a do-while loop … | |
Good day to everyone. I need help. Have to make more of these and need someone to show me how. My code doesn't work the way it should. It would have to * wait for you to click jbutton and then: - disable jbutton - roll die, then start timer … | |
import java.io.IOException; import java.nio.file.Files; import java.nio.file.Paths; import java.util.ArrayList; import java.util.List; public class MatrixPath { static List<String[]> obstacles = new ArrayList<String[]>(); static String[] size = new String[2]; static String[] startingPoint = new String[2]; static String[] endPoint = new String[2]; static int sizeOfRow = 0,sizeOfCol = 0; char one = ' '; … | |
the code will show you what im trying to do, I hope you understand im new to programming but know the basics of java and im trying to add Object Oriented Programming to my apps so its not procedural thanks , if you need more info to understand just ask … | |
Hi everyone, I am having some problems with this problem. I know I am almost there but I think I am not quite getting it. I get this error when I run it. Exception in thread "main" java.lang.NullPointerException at Newspapers.Subscribers.main(Subscribers.java:14) Can you guide me to the right direction. Thank you. … | |
Hi, I'm doing a simple study planner in java. Obviously I need to do a timetable generator. The program works like this: 1. The user enters the start time of school and the length of each breaks (Done) 2. The user enters the lessons(Done) 3. When the user presses next … | |
Yes i do know this have been posted atleast two times before, but i can hardly get anyhelp out of it. So back to my post, trying to figure out what i am doing wrong, and why my class wont compile. So i am not really sure what to do, … | |
hi I am trying to build a triangle calculator that can tell you if you can form a valid triangle, I have reach the calculation part as yet just the part of the gui and that is the part with the error. something is wrong and i cant seem to … | |
Hello, so I have this program which should be creating a file called output and appending some content from another file,data.txt, accordingly. Creating file called output works but then the output file is empty. what am i doing wrong? Oh and Im suppose to use method print() but that gives … | |
Hi, I have an app that worked very fine before Iam enabling the SSL to my domian name, I used an web url Ex: api.domian.com for getting detils to the app like login, result etc. some days before I have added an SSL (lets encrypt) the subdomian name suddenly the … | |
public class StudentListings{ private String name; // key field private int ID; private double GPA; private int next; private int size; private StudentListing[] data; public StudentListings(){ this.name= name; this.id= ID; this.gpa=GPA; } public StudentListings(){ next=0; data= new StudentListings[Size]; size= Size; } // end of constructor public boolean insert(StudentListings newStudentListing) { if(next>=size) // the structure is full return false; // store a deep copy of the client's node data[next]= new StudentListing.deepCopy(); if(data[next]== null) return false; next= next + 1; // prepare for the next insert return true; } // end of insert method public StudentListings fetch(String targetKey){ StudentListings studentListings; StudentListings temp; … | |
How to make a program that input 5 names and each names consists of 3 quizzes using array. | |
hi james Been a while since I have been here. am trying to do this program for the longest while. I have tried read and writing to a text file in java and i am getting a runtime error. can someone tell me where and why I am getting the … |
The End.