32,199 Topics
| |
hi.i realy need help am a new beginner in java.so i have been trying to do a code in java that returns the largest counter,refering to my libraries.so i was trying to invoke the method comparTo,so i dont know how to use it to compare all counter arrays so that … | |
plz someone give me a code of sudokou solver using backtracking algorithm as console app | |
My code is getting a small error that is refusing to let me entire code compile. Take a look. //THIS IS ASSIGNMENT 4, MAIN METHOD import java.io.*; //to use InputStreamReader and BufferedReader import java.util.*; public class Assignment4 { public static void main (String[] args) { // local variables, can be … | |
Hello All. I am having 2 problems here with my code. I will start off with the video code first. The video code should capture 20 seconds of the screen at 50fps, however, when I generate it, it generates a 1 minute 7 second video, and I am not sure … | |
I have a file with ints like this. 1 2 3 4 5 6 How to read first int from file? How to read second int from file? How to skip first line and but rest in 2d array? This is what I have so far. I am not sure … | |
I'm doing a quiz game using netbeans. I've already done the randomization of questions. The problem is, how do i keep a question from repeating itself? ex: chose correct answer --> questionrandomizer comes in --> next question appears but it's the same question earlier here's my code: package kiddiequiz.scienceforms; import … | |
I have to display the mortgage payment amount and then list the loan balance and interest paid for each payment over the term of the loan but my output isn't changing. import java.text.DecimalFormat; import javax.swing.JOptionPane; public class MortgagePmt { public static void main(String[] args) { int term; //Term in years … | |
My entity class: @Entity @Table(catalog = "emp", name = "person") @XmlAccessorType(XmlAccessType.FIELD) public class Person implements Serializable { private static final long serialVersionUID = 1L; /** */ @Column(name = "ID", nullable = false,length = 50) @Basic(fetch = FetchType.EAGER) @Id @XmlElement String id; /** */ @Column(name = "ADDRESS", length = 50) @Basic(fetch … | |
hi I am trying to build this game. what i have been trying to build for a long time now. it is a multiplication java game that need random numbers to generate it goes like this difficulty level-easy: this difficulty level easy has 3 rounds. the student must be tested … | |
I have a class where there are a few `static final String` variables that have few values that repesent color values. The class is basically used to get the color values. Is it better to convert this to enum? public class Color{ public static final String GRAY50 = "#808080"; public … | |
hi I am getting this an java.lang.array index out of bound exception: 2 error - I am wondering if this is where am getting it. look it over many times, and I know you all are tired of me but am learning. I like the array but it can be … | |
I have a problem with a project i'm working on, and I was wondering if it was possible to do what i'm thinking. Basically I have a simple mathematical GUI. I want it to take 2 inputs multiply them and output the answer. I am doing this all through the … | |
I have an android application where user will input data about car. When they are done, they will press a button to sync their data. That is, on pressing the button it will call a rest webservice (Jersey) to synchronize the data with the server which will store the data … | |
I'm working on a simple encryption program (for school). It is not currently "homework" just FYI, I'm just practicing the examples in the book. It uses a Caesar's Cipher method (an alphabetical shift). I have not tested this code very much. If something is wrong with it I probably don't … | |
**I'm using netbeans btw if you notice the long code for the GUI** I'm doing a quiz game. The questions are randomized. My problem is, the randomized questions do not appear on the questionLabel (JLabel Variable). I don't know what to do. Help? /* * To change this license header, … | |
Hi there, I wondered if some one would be able to put me through with this, as i am a newbie in Java. I have the following text file named dvdifo: *Donnie Darko/sci-fi/Gyllenhall, Jake Raiders of the Lost Ark/action/Ford, Harrison 2001/sci-fi/?? Caddy Shack/comedy/Murray, Bill Star Wars/Sci-fi/Ford, Harrison Lost in Translation/comedy/Murray, … | |
String contentType = request.getContentType(); if ((contentType != null) && (contentType.indexOf("multipart/form-data") >= 0)) { DataInputStream in = new DataInputStream(request.getInputStream()); int formDataLength = request.getContentLength(); byte dataBytes[] = new byte[formDataLength]; int byteRead = 0; int totalBytesRead = 0; while (totalBytesRead < formDataLength) { byteRead = in.read(dataBytes, totalBytesRead, formDataLength); totalBytesRead += byteRead; } String … | |
I need to fix a minor error in my assignment. The prompt is: Assignment #2 will be the construction of a program that reads in an unspecified number of integers from standard input, performs some calculations on the input numbers, and outputs the results of those calculations to standard output. … | |
When I run this I get an error, it's like it's not reading the printf and honestly I have no idea what else to do, can someone help me? import java.util.Scanner; public class MyCarPool2 { public static void main (String [] args){ //Declarations final int WEEK = 5, MONTH = … | |
What is difference between developing website using Java and PHP? | |
hi james/anyone/stultuske I am again trying and practicing my java. I am doing this payroll program which include doing methods and array and have no idea where I have gone wrong again i have debug it but inno me, cant find the error and it is there somewhere anyway here … | |
Hi All, I have a situation where i need to retrieve parentpath from childname in JFace Checkboxtreeviewer. By using below code, i can get both the path seperately. getCheckedElements() - child elements getExpandedTreePaths() - parent elements How i can map childelements with parent? here i get both seperately. When i … | |
Hi All, when i click the save functionality my request is processing and values are stored in database.but the request is coming from chrome browser its not processing and redirected to my error.jsp page.could you please help for this issue. | |
Noob Question. I need some clarifications with using class as a reference datatype or if you have any links that direct to a straightforward explanation,i'd highly appreciate that. (I had been surfing the net for hours, read some books but the explanation is either vague or just an introduction.) | |
While referring to a particular course I came across the following code to retrieve the current day: int julianStartDay = Time.getJulianDay(System.currentTimeMillis(), dayTime.gmtoff); long dateTime; dateTime = dayTime.setJulianDay(julianStartDay); day = getReadableDateString(dateTime); private String getReadableDateString(long time){ SimpleDateFormat shortenedDateFormat = new SimpleDateFormat("E MMM d"); return shortenedDateFormat.format(time); } My doubt is why are we … | |
what are the things a new developer should keep in mind while writing a program? please reply. | |
How do i write a simple login page using Java programming language with the following components -JLabel -JTextField -JButton | |
Hello All, Can anyone provide me the sample program of JFace Treeviewer. As i google it but cant find the right example. Any links with Simple example. Kindly help me out; Thanks in advance. | |
HI guys ..... i m trying to create a search engine through java..... is it possible?? if yes then would you please tell me how....?? |
The End.