32,204 Topics
| |
you think so? if you do, please post some of your reasons why java is easy to understand in this thread.. | |
Hello, I have a text file that is formatted as such: Volkswagen, 547, 9.78, 2 Mercedes, 985, 45.77, 35 ... I am trying to figure out how use the Scanner to read from the text file and store the information into an ArrayList of objects. ArrayList<Car> cars = new ArrayList<Car>(); … | |
hello all, How to get all the opened windows reference in java. Actually, my req is like.... user will set (fix) the cordinates of all the opened desktop windows (application). And he will use a timer to switching of all the open windows, so that at one particular time user's … | |
Hi all, I'm a student learning Java right now, so I'm still very new to what Java can do. I've written a program to perform a word count (thanks to VernonDozier for help with case-sensitivity) but another problem has come up. The program is identifying words with punctuation to be … | |
I am trying to get an inventory program can any one tell me what si wrong with this and how I can fix it, please! import java.util.Scanner; public class Cars1 { // main method begins java application public static void main( String args[] ) { Scanner input = new Scanner( … | |
I'm dying here! So far you guys have been way more help than my instructor who speaks Russian or something. Any advice will be more than helpful. This is my issue... Use the random class once for each die, the sum of the two values should then be calculated. Each … | |
can some1 give me an example of sorting and merging an 10 inputted integers?!using java array.. | |
I TRIED IT A LOT i used "getFrame().setSize(x,y)" in netbeans to set size of my frameview object in netbeans.....but it's not working. please help me | |
Hi, am using MyEclipse. The tutorial is on Hibernate & Spring ... [code] Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at org.springframework.beans.factory.support.AbstractBeanFactory.<init>(AbstractBeanFactory.java:94) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.<init>(AbstractAutowireCapableBeanFactory.java:109) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.<init>(AbstractAutowireCapableBeanFactory.java:118) at org.springframework.beans.factory.support.DefaultListableBeanFactory.<init>(DefaultListableBeanFactory.java:87) at org.springframework.beans.factory.xml.XmlBeanFactory.<init>(XmlBeanFactory.java:72) at org.springframework.beans.factory.xml.XmlBeanFactory.<init>(XmlBeanFactory.java:61) at com.myeclipse.hibernatespring.BusinessLogic.main(BusinessLogic.java:23) [/code] I do have the commons-loggin.jar added to the Java Build Path ... My class ... [code] … | |
hey Guys im using this bubble sort to sort an arraylist out but cant seem to output the sorted data out properly! Is there a return method i can use? Damn ive been stuck hours on this one... Anyone that could guide me to a solution would be great. Note: … | |
class t{ Somebody please help me with one very simple program in java. I'm new to java, so I can't understand what all this errors about. Please help me fix this program. It gives three errors: illegal start of type swith (s) orphaned case case 'Y': <identifier> expected switch (s); … | |
import java.util.*; class Degree2 { Scanner in() { return new Scanner(System.in); } void out(String m) { System.out.print(m); } double readDouble(String m) { out(m); return in().nextDouble(); } String readString(String m) { out(m); return in().nextLine(); } void foundRoot(double a,double b,double c) { if(a==0) out("Value x is: "+(-c/b)+"\n"); else { double data=(b*b)-(4*a*c); if(data>=0) … | |
[code=java] import java.util.*; public class Convert { Scanner in() { return new Scanner(System.in); } void out(String m) { System.out.print(m); } long readLong(String m) { out(m); return in().nextLong(); } int readInt(String m) { out(m); return in().nextInt(); } String readString(String m) { out(m); return in().nextLine(); } String digitOne(int n) { String st=""; … | |
This is what I am trying to do... I have a image and I create a bufferedImage and graphics out of that using: [CODE=java] BufferedImage img = ImageIO.read(file); Graphics2D g = img.createGraphics(); [/CODE] Now I play with the graphics and finally save the file using: [CODE=java] File outputfile = new … | |
am begin you people help send the available links or books to my mail. i wont to become a java programmer, but is been a long time have been reading so many book without any good understanding of the language called java. i also interested in been certify. please any … | |
Hi all, I'm currently learning Java right now through a class and my instructor has asked me to try writing a word-count program using a Map interface. It should run through command line and has to identify the number of words, the number of distinct words, and the distinct words … | |
Hey guys do you have any samples that uses hashtable in multi part form to insert image and information into database. In the jsp form, there is some codes regarding on hashtable that is input into by my tutor. However, I do not understand about it. My tutor taught me … | |
hello all, I am trying to create a class for an inventory program that will store certain values like name, item number number of units and price. I have written a code but it is apparently not correct because I get several error messages. can you please look at what … | |
Hi, I am trying to print a String value like this but still not able to get it,. my method is like this:- [CODE] Class1 { public String mystring; public void mymethod(){ mystring = ""; } //Then I am setting the value of mystring in other method like this:- public … | |
Hey guys, I was having a bit of trouble with making my GUI look presentable (not too busy or crammed up) and I have a few questions that shouldn't be too hard to answer. I'll briefly explain what I have at the moment. I have a total of 15 text … | |
Question - Three stacks can be used to sort a list of numbers. Assuming stack in holds the input list of numbers, stack out is to hold the output list after sorting the numbers and temp is used during the sorting process. The sorting algorithm follows. 1 set up stack … | |
please help me in writing a program in java "A student has a name,roll no., class, home address, date of birth. First dessigne a suitable class for date, write constructor and get and set functions. Then dissign a class for students informations. Write constructor, get and set function to calculate … | |
When i write like This: [CODE]JTextArea area=new JTextArea(); [/CODE] then i can do this :[CODE] area.append("");[/CODE] But when i write this : [CODE]JTextPane area=new JTextPane(); [/CODE] Then i can not write [CODE] area.append("");[/CODE] so what is equal append() method when i use JTextPane???? thanks in advance | |
Hi all, i'm trying to get a specific line in a text from a text file. In fact i want to read just the eight first line from my text file. It's only return the four first line. why? here is my code but, there is Format problem. [CODE]import java.io.*; … | |
hi, Im just wondering on how I could get a columns and a record count I mean the whole thing in a database aside from executing this statement [icode] "select count(*) from myDatabase" [/icode]...is there another statement that i can use instead of this one coz it doesnt retrieve any … | |
[code] import java.util.*; class Salon { static Scanner sc = new Scanner(System.in); public static void main (String[] args) { int skinType,option,maskType,massageType; System.out.println ("\t\t*********************"); System.out.println ("\r Welcome to Sally Salon"); System.out.println ("\r Services available:"); System.out.println ("\r 1.facial and massage"); System.out.println ("\r 2.facial only"); System.out.println ("\r 3.massage only"); System.out.println ("\t\t*********************"); System.out.println ("\t … | |
Hi, I'm having a page like below : [code=jsp]<html><head><body> <FONT COLOR=RED SIZE=5> <%@page import ="com.ui.CTransactionManager"%> <%@page import ="com.ui.CUser"%> <% String UserId = request.getParameter("UserId"); CTransactionManager objmanager = new CTransactionManager(); CUser user = objmanager.getUser(UserId); String m_staff_id = user.getStaffId(); out.print( "Staff Id : " +m_staff_id ); %> </font></body></head></html>[/code] here i want to pass … | |
hello, can u pls help me sir about my problem in the level order travelsal?... i did trace my code and i found no wrong. but when i compile it, there's something wrong in it and i dont know where... thank u very much! [code] int count = 1; public … | |
Hey Guys, I have a form that allows for additional rows to be added based on the number of serials being entered however I have just noticed that it cuts off at 9 rows and starts to repost the first 9 rows again for anything past that and i can … | |
hello, what is java spring? i read its a framework. but what compiler do i use to work with it? and from where i can download java spring? i tried this page [url]http://www.roseindia.net/spring/springdownload.shtml[/url] but their explanation, i dont find the things they put. |
The End.