32,199 Topics
| |
For my Java homework I had to make a program that simulates 100,000 people going 25 times around a monopoly board and finding the percentage times a space is landing on. I get this error when I run it. Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 39 at Monopoly.analyze(Monopoly.java:86) at TestMonopoly.main(TestMonopoly.java:6) Here … | |
i need someone to assist me in writting lamda expression. THE CODE IS ABOUT 15 LINES use this code snipt List<fruit> fruits = createFruitArrayList () ; Frit LargeApple = null; for (Fruit fruit:fruits) { if (fruit.getType() == null largeApple = fruit; } } } just rewrite plz | |
I'm trying to read a text file of a graph and print information about the graph including the order and size of the graph, rather it is a directed or undirected graph, if it is directed the in and out degree, and the and a list of all vertices for … | |
Hi, I'm a beginner with Java, can anyone tell me where my error is, I'm sure there's something I'm missing here with the array logic: public void scalarMultiplication(int c) { for( int i=0; i <values.length - 1;i++){ for(int j=0; j < values.length - 1;j++){ values[i][j] = values[i][j] * c; } … | |
Is there any syntax error in this code or query because i am not getting the required report? I have created a JFrame with JDatechoosr. When i select the dates and click view report, it gives me empty report while i know there is data within the specified date range. … | |
package pkgnew.approach; import java.io.*; import java.io.IOException; import java.util.*; import java.io.BufferedReader; import java.util.ArrayList; import pkgnew.approach.NewClass1; public class NewApproach { public static void main(String[] args) { NewClass1 no=new NewClass1(); BufferedReader br = null; Date d1; int n, c, d,k, swap,i=0,j=0,no_of_selected_item=0,newsupport=0,multiply=1,support=0,t=0; int numItems,numTransactions; double minSup; long diff; String configFile = "F:\\DP1\\DPmodification\\Config.Datasetsmall.txt"; try{ FileInputStream … | |
<Simple copy of teacher's homwork specification deleted by Forum Moderator> | |
What is a goodway to code a btn ation. To inialize adeaktop app from another desktop app. More over,run thejar use a eclipes build.xml . I built both apps in netbeans environment . | |
| Hello somebody should please help me with codes to run this assignment below: It should have a button that when clicked causes your code to simulate rolling a dice 100 times. Your program needs an array that will count the number of times that each of the six possible numbers … |
I have a webservice to be accessed which is based on request and response. Below is how my php codes are works perfectly fine. class fNewRequest { function fNewReq($pTK, $pVID) { $this->pTK= $pTK; $this->pVID= $pVID; } } /* Initialize webservice with your WSDL */ $client = new SoapClient("http://**.**.**.*/**/**/***/webservice.asmx?WSDL"); /* Set … | |
I want to run a java application which calls a web service. Everything works fine from the netbeans ide, but fails when I run the .jar generated. What could be the problem? How can I check the content type that the error is pointing at? The error says: **SEVERE: SAAJ0537: … | |
I struggle to find a solution at my java project... It gives a lot of bonus as well.. so, i would really appreciate it if someone is willing and expert with java and can help me with my project, if he has time to help me with it. :) If … | |
try { /* Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver"); String loc = "jdbc:odbc:Library"; String filename = "C:\\Users\\Krishal Lad\\Desktop\\Library.mdb"; String database = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ="; database+= filename.trim() + ";DriverID=22;}"; // add on to the end con = DriverManager.getConnection (database);*/ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String database = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb,*.accdb)};DBQ=Library.mdb;"; System.out.println("connecting to database..."); Connection conn = … | |
I am trying to execute xmlaccess.bat file of web sphere Portal server uisng java but not getting any issue as well as no output but when i execute this bat file through command prompt,its working Fine..why it is ? dont'Know..please Help me out... MyAPP : public class BatchAPP { public … | |
Not sure what it is nedding I'm needing help on coding this program I get back some 2 errors. What I have is: public class Inventory { private double ItemNumber; //to store Item number private String ItemName; //to store Item name private double UnitsInStock; //to store number of units in … | |
I have two different format of code for insert query using jsp+servlet+mysql. Code-1 ====== Class.forName(JDBC_DRIVER); // Open a connection out.println("Connecting to a selected database..."); con = DriverManager.getConnection(DB_URL, USER, PASSWORD); out.println("Connected database successfully..."); // Execute a query st = con.createStatement(); sql = "insert into users (name,email,password) values ('" + name + … | |
for my assignment I am to only add the sort and total inventory methods in the inventory class. And not create an array in the inventory class at all. My inventory class should contain all the variables needed to use with the two new methods: sort and calculate total inventory.By … | |
if i make small jframe with 2 jComboBox(jComboBox1,jComboBox2) and a jbutton I want that when the user click on jbutton it will display jComboBox1 and jComboBox2 in the label | |
I need help with my getName method. The error message is invalid method declaration, return type required. And i don't know how to write a method to change the canidate's name. Thank you in advance. /** * Class to create a Candidate object * * @author la * @version 4/21/07 … | |
Alright, so I am building a Converter to convert ASCII to Binary and for some reason, the for each loop stops working when it hits a space, and I have no idea why. I'm probably just over thinking it. Extra: Can you tell me how to force the output binary … | |
My code compiles but it has a java null error. import java.util.Arrays; public class Example { private int[] NumberArray; public Example() { int[] NumberArray = new int[4]; } public void setNumberArray() { NumberArray[0] = 20; NumberArray[1] = 15; NumberArray[2] = 22; } public void printnumberArray() { for(int index=0; index < … | |
I have program that does OCR conversion using asprise plugin, now i want to save the whole console output to a text file. If somebody can point me in the right direction it would be very helpful. By the way I use Eclipse. Thanks. | |
<style> .msgBox{ position:absolute; z-index:10; border-radius:5px; border:1px solid #F5F5F5; background-color:#DDD; box-shadow:1px 1px 5px #999; overflow:hidden; display:none} .msgBox ul, .msgBox li{ list-style:none; padding:0; margin:0; border:0} .msgBox .title{ border-bottom:#AAA solid 1px; padding:5px; background-color:#CCC; font-family:Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif; font-weight:bold; text-shadow:1px 1px #DDD; font-size:12px} .msgBox .msgContent{ border-top:#F5F5F5 solid 1px; padding:5px; text-shadow:1px 1px #F1F1F1; … | |
The bank already has a Java application. But they want certain new features to be added and some existing functionality to be changed as per their new policies. For this, Angelina needs to address the following issues: [20 Marks] 1. There is a class named Accounts which calculates the interest … | |
I want to find all the subset of a set.Can sumone plz help me through this.I have a array which would consisting ={1,4,5,6,7} i want all subsets.. {1,4} {1,5}...{1,4,5,6} {1,5,6,7} {1,4,6,7}..etc. | |
Hi, I'm having a major problem with an algorithm for Java. I am building a program that recursively parses a simple programming language that follows obvious production grammars. My main issue is nesting. For instance, the pattern might be something like this: Create Jpanel1:{ Create JButton1 Create JPanel2:{ Create JButton2 … | |
I am looking for someone who can make a specialized programm for blackjack, to run proofs. there is nothing to do that is available. I am willing to happily pay for the program. please contact me for further information. thank you. | |
Create a grade calculator which allows a user to input a mark out of 100% and displays the grade F, P, C, D, or HD. Here are the grade cutoffs: F means Fail and is the mark is from 0 but less than 50 P means Pass and is the … | |
public class SongIterator<T,L> implements Iterator<Song<T, L>> {} | |
**I am using software to create tile map. on map there are different objects ex circle, rectangle, ellipse, polygon etc... I have problem creating ellipse shape. other than that every thing works fine.** ** //loop though map objects and store in 'shape variable'. //so if its circle than store in … |
The End.