32,199 Topics

Member Avatar for
Member Avatar for Alex Edwards

Can someone point me in the appropriate direction to learn the proper use of tagging Information on data with Java Annotations? I've used them before (@Override, @Deprecated and @SuppressWarnings(sp) ) but I'm interested in creating my own for testing-purposes and possibly for medium-to-big projects. I need to understand when to …

Member Avatar for sciwizeh
0
115
Member Avatar for brizwhiz

I have constructed a source code for Java Payroll Part 3: I'm receiving the following error when I try to compile my program: PayrollPart3.java:56: 'else' without 'if' ^else Any advice would be appreciated to why I am getting this error. Thanks! [code=java] // Fig. 1.3: Payroll Part 3 // Program …

Member Avatar for brizwhiz
0
108
Member Avatar for chukeej

I uninstalled Java Runtime Environment 6 through Add/Remove Programs - with the intention of reinstalling the latest update version which I have not yet done. I did a Search for Java and found several files - some as far back as 1999...got my pc in 2002. Before I reinstall JRE, …

Member Avatar for gerbil
0
183
Member Avatar for VernonDozier

O.K. I wrote my own version of the Addiction Solitaire game using a JFrame and it worked. I want to put it on the web, so I'm converting it to a JApplet. I have 52 PNG files, one for each card, that I need to be able to access for …

Member Avatar for VernonDozier
0
225
Member Avatar for lich

hi well i just started learning java. and up to now we did exceptions and loops and most of the java concepts.. and i used J creator lite version. but in my project i have to make a interface. so do you have any idea how to make it done …

Member Avatar for sciwizeh
0
85
Member Avatar for worldwaffle

I'm only 11, but I know html, CSS, javascript, and C#. I was wondering, [B]if Java is like C#[/B], as it looks pretty similar, I could just start coding :)! -worldwaffle

Member Avatar for Alex Edwards
0
148
Member Avatar for sciwizeh

ok, so i've been working on this project for a long time now, a falling sand game, on and off. it works [I]almost[/I] the way i want it too... 2 problems, one i don't think this community will be able to help me with, the other, the optimization, i have …

Member Avatar for sciwizeh
1
319
Member Avatar for tuse

I'm doing a program on the addition of 2 Sparse Matrices. This is what I have coded- [code=java] import java.io.*; class Sparse { int r,c,m[][],s[][],count,rt; static int res[][]; public Sparse() { count=0; rt=1; } //Take the matrix public void read() throws Throwable { BufferedReader buff=new BufferedReader(new InputStreamReader(System.in)); System.out.print("Enter the number …

Member Avatar for tyagi
0
250
Member Avatar for newtechie

i was trying to write a code for counting the number of ocurence of a particular word from a sentence.it gives me a wrong output it starts checking for the same alphabets in the sentence rather than the word. [CODE]import java.lang.String; public class StringCount2 { public static void main(String args[]) …

Member Avatar for tyagi
0
151
Member Avatar for Dr Windows (XP)

Hello all. I would like to calculate, assign and do a lot with my program (java). Here are my codes. import java.util.*; public class Test { public static void main(String args[]) { Scanner scan = new Scanner(System.in); String[] s = new String[9]; int a; for(a=0;a<9;a++) { s[a]=scan.next(); } } } …

Member Avatar for sciwizeh
0
104
Member Avatar for just asif
Member Avatar for Ezzaral
0
93
Member Avatar for new_2_java

Hi all, I am getting the content of an object which is returned as [B]ByteArrayInputStream[/B], and then I am assigning to another object, which accepts input as [B]ByteArrayOutputStream[/B]. Can someone please suggest as how can I convert ByteArrayInputStream to ByteArrayOutputStream... Here's my code: [code=java] ByteArrayInputStream b_input = source_object.getContent(); // how …

Member Avatar for new_2_java
0
1K
Member Avatar for Neerajjaggi

[code] <%@ page import="java.sql.*"%> <%String fname=request.getParameter("name"); String lname=request.getParameter("last"); String id= request.getParameter("id"); String pass=request.getParameter("password"); String pass1=request.getParameter("passcon"); String month=request.getParameter("Months"); String date=request.getParameter("date"); String year=request.getParameter("year"); String gender=request.getParameter("gender"); String country=request.getParameter("country"); %> <%=try { Connection c=null; Statement st= null; DriverManager dm=null; String pass=""; String user=""; PreparedStatement pt=null; String url="Jdbc:Odbc:jaggi"; Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); c=dm.getConnection(user,pass,url); if(pass.equals(pass1)) { pt=c.prepareStatement(insert into Registration …

Member Avatar for peter_budo
0
91
Member Avatar for csesanj

Hi Guys, Hey can anyone help me out..First of all i would like to introduce you..I am Sanjeev from India.I am a computer science final yr engineering student...I just want guideline from you all experts sitting here in this community regarding a java based project..Can you suggest any such type …

Member Avatar for peter_budo
0
139
Member Avatar for hapax

I want to learn Java web development. What should I study first? JSP, servlets, and JDBC? Or should I jump right into learning to use environments like Struts, JSF, Spring, Hibernate? Which of these would you recommend, if so? (I'm from an ASP.NET/C# background, but I want to start learning …

Member Avatar for stultuske
0
100
Member Avatar for zyaday

I paint a lot of images on my screen before the JFrame is displayed...It takes along time..what can i do to make the image load faster..

Member Avatar for sciwizeh
0
91
Member Avatar for sciwizeh

Hypothetically, say i want to know how may times anyone has clicked a button in an applet. NOTE: this is not what i actually want to do but it is a good example. more specifically i have a text file in a jar, along with classes, called clicks.txt. every time …

Member Avatar for sciwizeh
0
110
Member Avatar for PaulNickel

Hello everybody, I have been working on this code segment for about three days and cannot figure out what is causing this error. I am trying to get a specific value out of an arraylist of sorted objects. Here is the code: [code=java] public RateEstimator getMinRate() { // return null …

Member Avatar for PaulNickel
0
111
Member Avatar for SonxQ7

Well i know the basic difference which is in C++ this is a pointer whilst Java is a reference to a class... I have a confusion though since am new in Java, can you reference a super class with "this"? more so, is the an underlying difference between the C++ …

Member Avatar for Alex Edwards
0
160
Member Avatar for dastisrinu

I need one genric java code to read Java/servlet/jsp files and identify Connection,Statement,ResultSet Objects And find out whthere they have been closed. Output should be like this : Source file Connection/Statement/Resultset not closed

Member Avatar for Ezzaral
0
32
Member Avatar for selvaganapathy

Can any one tell about the difference between the Abstract Class and Interface? Can abstract class replaces Interface? If all things can be done in Abstract class Why we need Interface?

Member Avatar for selvaganapathy
0
86
Member Avatar for JyotiC

Hi, I have an xml file, corresponding to an xsd. If there some tool, which would take this xml and xsd and give me an object. And also take the object and xsd and give me xml. I read about couple of tools like JAXB, xstrem and xmlBeans. The issue …

Member Avatar for sciwizeh
0
116
Member Avatar for hny_lyn

hello sir!!! i need the answer as soon as possible!! can you change this code and execute it using the JOptionPane... Please help me!!! You may send your answers to this address... <snip email> Thanks a lot!!! import java.io.*; [code=juva] public class ToyoradaII { public static void main(String []lyn) throws …

Member Avatar for javaAddict
0
184
Member Avatar for samuel_1991

Hi everyone, I am trying figure out is there a "more proper" way to show the multiple lowest values in an array. My array has 2 of the values that are lowest among the 8 values. I would like to know is there a way to show both of them …

Member Avatar for samuel_1991
0
132
Member Avatar for esy928

Good Day! I'm working on my homework for the past 5 hrs now, i really need some help. I need to create a program that will generate a random point on the Panel. the problem is i cant seem to make the point appear on my panel. any help is …

Member Avatar for esy928
0
79
Member Avatar for netnuta

Hi there all! I do not have a great knowledge of php but I do know basic html. I have a javascript popunder script that I would like to try on my site that runs on a php script. I know how to insert this script into an html page …

Member Avatar for netnuta
0
91
Member Avatar for Gink

Is the best way to check for 2 words of same type in a string to make a stringtokenizer and story every word in an array then compare it in a for loop? seems like a hassle for comparing for same words i was wondering if theres a better way?

Member Avatar for newtechie
0
127
Member Avatar for Motvel

The idea of program is to change the images between them. Images here is stored in Icon Labels. If i click on image(label), i need to memorize this image, and change with the second image. Like a puzzle game. I can to return the last two clicked image, but when …

Member Avatar for Motvel
0
88
Member Avatar for JennaB

I have this code and I am trying to have my on_path method reference the variable first but the compiler says cannot find. I have it declared not sure why its not recognized? [ICODE]public class hmwkr6 { private static final int size = 5; private static final int wall = …

Member Avatar for Ezzaral
0
101
Member Avatar for wrappingduke

hello, Attempting to connect HSQL db by calling a config file from a java command line. However, receiving the following error message: Failed to retrieve connection info for database 'personal': Please set up authentication file 'C:\Documents and Settings\user\sqltool.rc' Here's a sample of the command: [CODE] java -jar \pathto\hsqldb.jar personal /pathto/Export_Data.sql …

Member Avatar for Ezzaral
0
159

The End.