35,618 Topics
![]() | |
Is there any method in java to generate random number (integer, byte or float). please tell me if any i need it in my program. if possible please give full example. thanks. | |
Hello there, I'm new to Java programming nd I wan't to learn more from it. May I ask you some tips in creating a Lucky Nine game in Java with AI as the other player. Thank you so much for you help. | |
Hi, I want to start the command prompt window from my java program. Tried using Runtime but its not working.These are my codes : [code]String command = "cmd.exe"; try { child = Runtime.getRuntime().exec(command); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); }[/code] Actually, its working when i … | |
So I am having trouble knowing what to return in the bottom method any help would be appreciated . Here are the specifications for completing the StringArray class: (a) In the class StringArray write method numInArray,using the method signature below. numInArray should return the number of times the string s … | |
Hi guys, This is my first post and basically i require some help editing my current code to help display number of students with a mark of 40 or above specifically. And also i am having difficulty generating a average i thought i done it but it remained constant a … | |
I tried to run an Ionic 3 project from existing files using not C++ but Apache/Cordova and i am getting these errors. Idid a Typescript project works fine. But Cordova won't run with Javascript? Severity Code Description Project File Line Suppression State Error TS2304 Build:Cannot find name 'object'. ionic2 C:\Users\Simon\AppData\Local\Microsoft\Windows\INetCookies\Desktop\Various … | |
So I have a project with a tester that is not displaying what I thought it would display. The project description and everything is as follows: Given an array of integers, how can we make some basic statistical calculations on the data? Specifically, we want to be able to determine … | |
I facing a problem with checkbox value that already exists inside the database. so how can I retrieve those value into another database table? The table subject and service below is what I want. But based on the code below the SERVICE TABLE on SUBJECTID COLUMN producing null value. How … | |
hi can you help me please Write a program that breaks a number into its digits. Program keeps prompting the user to enter an integer and displays the digits of that integer until user enters -1 run like that Enter a number (-1 to end): 3457 ↵ Digit1 = 7 … | |
Write a program that computes the gold zakat. The user should enter the gold weight in gram and its worth. The program should print and calculate the zakat if the gold is worth 3000 or more. Otherwise, the program should print 0. Hint: zakat = gold worth * 2.5% how … | |
Hi there. Sorry if this is in the wrong place! I am looking to create an app which allows a user to click on some words from a list (or three) to create a random sentence. What would be the easiest way to do this? I am using Android Studio … | |
I am creating an application that uses NHibernate, an object relational mapper that is a port of the Java Object relational mapper hibernate. Currently I am trying to represent my entities via hibernate xml files. The application I have right now is throwing an error I am thinking may be … | |
I have the following error as part of my nhibernate project; **Could not find a setter for property '0' in class 'AdHockey.Models.User'** The following is my model; public class User { /// <summary> /// Unique identifier for group used by program and database layer. /// </summary> public virtual int UserId … | |
Hello, is it possible to have a multidimensional array of different type? We have to create a simple "joke" application with GUI, and what I was thinking is that for each question a character(image) with a speech bubble asks a question like for example a joke about a banana would … | |
So I am having trouble with the last bit of the car class, I have to update the number of gallons in the car based on the number of miles driven... public class Car { private double mpg; private double mileage; private double tankCapacity; private double gasInTank; /** Constructs a … | |
Alright so I have a tester for this class and it keeps saying this message: "Now testing your drive method: *** A car with mileage of 700 miles driving 400 miles before running out of gas should not now have mileage of 1700.0 miles" However when I remove the mileage … | |
So I am simplifying fractions for my fractions class and I am having trouble with the euclidian code for the gcd, it also doesn't print to the console window it just runs and nothing happens: public class GCD { public static void main(String[]args) { int n = 5 ; int … | |
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 . - … | |
//The php section of the code <?php function getJSONFromDB($sql){ $conn = mysqli_connect("localhost", "root", "","rent"); //echo $sql; $result = mysqli_query($conn, $sql)or die(mysqli_error()); $arr=array(); while($row = mysqli_fetch_assoc($result)) { $arr[]=$row; } return json_encode($arr); } $jsonData= getJSONFromDB("select Pic from Display"); $jsn=json_decode($jsonData); //for loop to retrieve rows from database for($i=0;$i<sizeof($jsn);$i++){ $a=$jsn[$i]->Pic; //here is the main … | |
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 … |
The End.