32,199 Topics
| |
Dear all, I have declared following two hashmap. `public static HashMap<Integer,String[]> m1 = new HashMap<Integer,String[]>();` `public static HashMap<Integer,String[]> temp = new HashMap<Integer,String[]>();` At starting point of my execution both map will contain key from 1 to 20 and mapped value with it. Means key value pair are same in both … | |
import java.util.*; public class MyLinkedList { private Node head; private class Node { private String element; Node link; } public MyLinkedList() { head=null; } public void insertAtHead(String ele) { Node curr = new Node(); curr.element = ele; curr.link = head; head=curr; } public void insertAtTail(String ele) { Node curr = … | |
How do I graph a parabola using an equation where the user can just input an angle and velocity. And is it possible to have an object follow this path? | |
Hey, I am trying to use a for loop inside a recusive method, but everytime the method runs recursively, the integer in the for loop resets to zero because of the initialization. Is there anyway to keep the integer counting up, and not resetting to zero? Thanks in advanced! | |
I apparently can't figure out what I am doing wrong....I have been reading all day and googling help but it hasn't helped. Here's what I have... public static void main(String[] args) { ArrayList<Animal> animalCensus = new ArrayList<Animal>(); Scanner input = new Scanner(System.in); //int uniqAnimal = 0; //String animalName; String endList; … | |
Help me in constructing a MySql Query to retrieve the rows based on datetime column. Below are the conditions: 1)The date difference between today and date in that column sholud be =>2 days. 2)If the day of the date in DB column is Thursday/ Friday then the date difference between … | |
I have a Date Picker code. Can you help me in constructing the Time Picker . Or can you suggest me some websites/materials to refer Thx in Advance | |
** Please Help. When I call this class, it causes the program to stop responding? Actually I used a button must be clicked to start call the class in another class to run it. after I press that button it causes the program GUI to stop responding. I am developing … | |
Hello everyone, Im new in web development, Im using localhost (XAMMP),I'm trying to make my website which basically allows users to compile and run their submitted java program on my server(my web page).Essentially, I want when the users click a button(upload) they upload file from file source(e.g desktop or anywhere … | |
I was going to start Apache/Tomcat as root but Ive rethought it and have gone against it. How can I make my web service read/write from "/"? I keep getting permission denied exceptions... | |
null pointer exception in jdbc how to over come this problem why this null pointer exception is comming in jdbc....... | |
class ThreeException extends Exception { /** * */ private static final long serialVersionUID = 1L; static int count = 0; public static void main(String[] args) { while(true){ try{ if(count++ == 0) throw new ThreeException(); System.out.println("No Exception"); } catch(ThreeException e){ System.err.println("Three Exception"); } finally { System.err.println("In finally clause"); if(count == 2) … | |
Hi All, I have configured a spring JPA project but when I deploy and start the tomcat I get the exception nin stacktrace as shown below. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/database-config.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are: … | |
I want to do a project on hotel management. But I can not know how to take the print of the bill of a customer. After I entered data in textfield how to take printout those data in a money receipt format. | |
I have created an application using swing. On clicking a particular menu item, a form is loaded,and after saving it a pdf generates. For reporting, i am using iReport. Here is the code snippet MyiReportViewer.java package sms.ui.ireport; import java.awt.BorderLayout; import java.awt.Container; import java.io.InputStream; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import … | |
Supposed i will input a string like "java"but the display will change instead of "java" the display will change every character and become **** please help.. :) | |
Hi I have this code that performs error checking on initial values. Everythinbg works good but how would I go about allowing for user input? I am thinkging JOptionPane but where would I add that? public class Date { private final int month; private final int day; private final int … | |
Hello I am having trouble converting a long (cents) into currency format. My Code: l long doublePayment = 1099; //Should equal $10.99 DecimalFormat dFormat = new DecimalFormat(); String formattedString = dFormat.format(doublePayment); System.out.println(formattedString); Output: 1,099 I also tried: long doublePayment = 1099; NumberFormat n = NumberFormat.getCurrencyInstance(Locale.US); String s = n.format(doublePayment); System.out.println(s); … | |
Hi, I don't know what happen all a suden but all my textfiels variable are now underline in red. I have : st.setString(1, t1.getText()); st.setString(2, t2.getText()); st.setString(3, t3.getText()); Where t1,t2 and t3 are my textfields variable name but is says cannot find symbol. Everything was working fine, I don't understand … | |
I need a help with this Java project. And please note that Iam not try to cheating to complete this project,my teacher is give the permission to use any source to help do this project and I'm not plagiarism I will give the credit to the source code in this … | |
hello, i have this code $divToSubjectShow = "<div id='subjC".$subId."'><div class='boxC'>".$subName."<span onclick='delTempSubject(subjC".$subId.")'>X</span></div></div>"; to store in div innerHTML with js and i get this error > missing ) after argument list any idea? | |
Dear all, I have stuck with one problem. I have taken one Hashmap, Performing some input operation,remove operation on it. So after performing remove operation, i want value of 2 successive key in two different array. Also i want to match 1st key's value with all other keys' value. Like … | |
Is there a way to set Max date in Java for the calendar control or restrict the user from selecting the future dates? | |
Hello I'm new learner in java, and I'm facing a problem to develop a Java application that will ask the user for the time in terms of hour and minutes and display the time by drawing a clock. I have created two classes, and the code is below. Please could … | |
hey iam writing this code in button's actionPerformed but it doesn't displaying any image . Can you identify what is problem in it??? JFileChooser chooser = new JFileChooser(); FileNameExtensionFilter filter = new FileNameExtensionFilter("Images","jpeg", "jpg", "JPG", "JPEG", "gif","GIF", "png","PNG"); chooser.setFileFilter(filter); if (chooser.showOpenDialog(this)== JFileChooser.APPROVE_OPTION) { File file = chooser.getSelectedFile(); ImageIcon icon = … | |
Hey guys, its been quite a while since ive posted here :-( Im making a game in java (nope not for school, just for fun) Anyway, ive created some logic for an enemySuicideBomber(spaceship game, prolly not what your thinking) to select the closest location. It works for the most part, … | |
i want mini project on online share trading in advance java........please help me that how i can made? | |
When I write in my terminal, java -jar myJar.jar, it gives me an error "Resource Not found res/playNow.png" When I run it in eclipse, it does not give me any errors about this image. My folder in my eclipse is outside my package called res and inside it are images. … | |
I and my friend are starting aur project based on java . We are planning to create a java based forum software . But we are confused to wheather make it a app on windows communicating a DB server ...Or to make it based on serverlets/jsp etc (somthing like vbulltein … | |
How do I access My jar in the mac os terminal. I have a jar in my desc top called System FRONT.jar First, I put `cd desktop` then i put java -jar System FRONT.jar It says unable to access jarfile system Then I tried another jar which does not exist, … |
The End.