35,617 Topics
![]() | |
Hi friends, i want to know good books that are present to learn J2EE(java). can u please suggest me. | |
Hi, can any one please help me . how to do web services using REST. please give an detail example. i am using JAVA technology. my id is <email snipped>. THanks in advance. | |
import java.util.*; public class al{ public static void main(String[] args){ List l = new ArrayList(); Object a = "hello"; l.add(a); l.add("asdasd"); l.add("hgdfsdfshjk"); System.out.println(l.isEmpty()+""); System.out.println(l.get(0)); for(int i=0;i<l.size();i++){ String b = (String)l.get(i); System.out.println(b); } } } i still havent figured out how to solve the warning it gives. can someone esplain to … | |
Here is the code that I have written please check what is wrong, as I am not able to display Images on canvas. I am trying to create game. package PuyoPuyo; import java.awt.Canvas; import java.awt.Color; import java.awt.Graphics; import java.awt.Image; import java.awt.Toolkit; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import javax.swing.JButton; import javax.swing.JFrame; import … | |
Microsoft does it again! After having a court trial with Sun, about WindowsXP's problem with Java, Microsoft has come up with a good idea. Make its own version of Java and screw Sun. http://news.com.com/2100-1001-937053.html?tag=fd_top | |
Dear All I admit that I am new to this all. I am trying to run a simple login function. I have two jsp files, login.jsp and welcome.jsp and I have one servelet login.java My project name is onjava (I am doing this from an example from the web). My … | |
Hey, I've created a small rich client eclipse application from the wizard. now i changed my mind and i want it to run as a plugin. it should be fairly straight farward but i can't seem to find where on the manifest to make the change. please help | |
Just have small program to practice with Calendar. However I come accross something unusual. Once you set date for 1st April 2007 or 1st June 2008 for example you get wrong number of the week. example bellow show code set to date 1st June 2008 [code] import java.util.*; import java.text.DateFormat; … | |
Hey, I came across this question, this is the 1st time I write a XML file, and I have no idea if my work is correct, or if thats how its supposed to be.......please give me your feedback: Consider the following XML file that describes a pizza: An order for … | |
I'm working on calendar application, similar to one provided with instalation of Tomcat. There you have class1 with methods which provide data for class 2. I have no problem to compile class1, but getting errors while compiling class2. This apply also to Tomcat examples if you try to recompile them. … | |
I have a probelm regarding printing a jsp page. When i print my page from browser, which comes in poppup window. then right sideof page is cutoff. that page contain main table tag which defines the complete layout.all data are td tag. I tried to change width and also margins … | |
Ok I have a program that accepts input from a file. it reads in inputs and is supposed to close automagically when it sees the number '42'. Only problem, I can read the input just dont know how to look for 42. Here's the code? HELP plz. [code]import java.io.* ; … | |
This is an example from a book to explain using the WhoWins type for three possibilities. But when I go to compile, I get the error, "cannot find symbol - class WhoWins". Any suggestions? Thanks [code]import java.util.Scanner; import static java.lang.System.out; class Scoreboard { public static void main(String args[]) { Scanner … | |
first of all I run on microsoft XP, I have a toshiba satellite laptop 1415-s173. I think i'm running using IE 6 I'm not sure I do'nt know how to find out. I think it's either 6 or 5.5 and AOL version 9.0 This is a fairly new computer, purchased … | |
I've never actually ran a CLI based program outside of bluej. And after exporting one of my programs to a jar, I noticed I was not able to get any results when double clicking the jar. So, I'm guessing CLI based programs are run by a different method, or require … | |
hello, What problems will I encounter if I use Array although I don' know how many elements need I store? If I set the array size very large than I expected, can problem arises anymore? I tried to use Arraylist. But when there are many attributes, I always declare a … | |
| |
I got this servlet off of coreservlets.com i want to know how i can edit it so that it connects to my database to get catalogItem instead of using static html. /** A catalog that lists the items available in inventory. * * Taken from Core Servlets and JavaServer Pages … | |
Hello, im trying to compile few .java files but i'm geting error message: GraphicsHandler.java:62: ';' expected for (Player p : server.playerHandler.players) { GraphicsHandler.java:67: illegal start of expression }}} I just don't know what to do... ----------------------There is my GraphicsHandler.java-------------- public class GraphicsHandler { public static int[] GFXspot = new int[5001]; … | |
hi all, i got this example from a website, but unfortunately i cant understand some cording in that source. the green color lines are the difficult points that i could not understand. also the database name, user name and password has not specified at anywhere in this cord. how can … | |
So I've run into this situation a million times in my "learning career" and I've always found a long way around the issue so as not to risk throwing unnecessary exceptions.. Let's look at a simple example... [CODE=java]boolean IsEnabled (JPanel MyPanel) { return MyPanel.isEnabled(); }[/CODE] Throws java.lang.NullPointerException if null is … | |
Just started reading 'Beginning Programming in Java for Dummies' and when I got to the first example below, I'm getting errors when i try to compile? I have the JDK 5 update 9 and the Jcreator IDE installed. Thanks in advance. [CODE]class MyFirstJavaClass { /** * Method main ** * … ![]() | |
Hi everyone iam trying to learn awt and applets. The code below has compiled well but when i run it iam getting an Exception in thread main "Java.lang.NoSuchMethodError". Could any1 pls tell me where i have gone wrong. import java.awt.*; import java.applet.*; import java.awt.event.*; public class ButtonTest extends Applet { … ![]() | |
I am writing a code for class that calculates 3 different mortgage rates with 3 different time periods and then displays the monthly payment. What I am getting for the output is on 2 of the payments is a negative payment amount. I am at a loss to understand why. … | |
Taking a Java test I found a for{} loop which had a : character in it?... like this... for { : } I was supposed to fill in some objects, but I have no idea how a : character does in a for loop? Any comments? JON | |
Hi Everyone, I'am currently working on this question: Write a producer-consumer problem that uses threads and shares a common buffer. However do not use semaphores or any other synchronization primitives to guard the shared data structures. Just let each thread access them when it wants to. Use sleep and wakeup … | |
Hi I wrote code for Java program to simulate the rolling of 2 dice. The application should roll the dice 36,000 times. In a tabular format it should show the frequency of rolling 2,3,4,5,6,7,8,9,10,11,12 and also the percentage. It compiles alright but I am not getting the output. Can someone … | |
Hi I have created a registration form, where on the first page the user enters a user name and password, then they go to the next page where they enter their name. This then goes to the next page where they enter their address, then there contact details. But I … | |
Hi Im trying to create a registration form. I have created the form which includes user name and password text fields, by using the record insertion form wizard. Dreamweaver has inserted a hidden field, but how do I change the properties of this to insert the data into a database … | |
Hi all... i am trying to add a vector to the hashtable as a value.This vector contains three fields.But the problem is while adding new vector to the hashtable as value the old vector is also replaced with new one.... So please help to solve this problem.. |
The End.