32,204 Topics

Member Avatar for
Member Avatar for daudiam

[CODE]class hello { } class hello1 { public static void main(String aa[]) { hello ob[]={new hello(),new hello(),new hello()}; hello ob1[]=ob.clone(); // 1 } }[/CODE] ob is an array which is also treated as an object, and hence has a default clone method which is called at (1). But the default …

Member Avatar for daudiam
0
226
Member Avatar for justinwarner

Hey guys, So, I need to add booleans on my project for the final piece. I have all of it done but the booleans. Basically, I checked about 10+ links on google, and none of them really explained how to do booleans. So, what I need is something that does …

Member Avatar for ~s.o.s~
0
148
Member Avatar for ncstplaya1234

Hey guys, I'm trying to create a program that has three items and adds the cost of the three items and prints the final total with sales tax. I need a subtotal, sales tax, and total amount. I'm having a problem getting the program to calculate the quantity correctly and …

Member Avatar for ncstplaya1234
0
3K
Member Avatar for NewOrder

i understand what the code does. but i dont understand a few lines: [CODE]package il.co; public class LinkedListEx2 { public static void main(String[] args) { LinkedList list=new LinkedList(); list.add(new Car("BMW", 150000)); list.add(new Car("SUBARU", 60000)); list.add(new Car("TOYOTA", 58000)); list.print(); } } class LinkedList{ private Unit head; public void add (Car data){ …

Member Avatar for adams161
0
132
Member Avatar for amit.hak50

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Member Avatar for amit.hak50
-1
71
Member Avatar for Simplelyn
Member Avatar for manishanibhwani

i m unable to interrpret my package from any other drive???? i mean ..i hav created my package, compiled it bt unable to run it... can anyone tl d way of running it or setting the path... the coding is done in command prompt

Member Avatar for NormR1
-1
95
Member Avatar for codeFaceMcGee

I know that it's a very undesireable scenario, but I need to create a database straight from java code. Yes, a database. Not a table. A database. The database will be dropped at the end of the program and will never be directly touched by the user, so all I'm …

Member Avatar for codeFaceMcGee
0
619
Member Avatar for sanelepatrick

Hi everyone, PLease help me out with permuation cipher, an example given to me shows a plain text as abcdef...up to z and ciphered text as fghijabcdevwxyzklmnopqrstu.. Im seeing some sort of a pattern with this text,Can you guys give an example java code to cipher of decipher using permutation …

Member Avatar for jon.kiparsky
0
134
Member Avatar for manishanibhwani

can anyone suggst a link where i cud find the list of various packages and classes already defined in java library

Member Avatar for Ezzaral
0
68
Member Avatar for jalpesh_007

I want a java program of ceaser cipher encryption and decryption technique. in which you have to take input(plain text) from input.txt file and encrypt it with program and save the output(cipher text) in output.txt file. again you have to take input from output(Cipher text) and apply decryption program and …

Member Avatar for brandonrunyon
-3
465
Member Avatar for vinay1424

Actually i m doing constructor implementation.But i am new to java, can any tell what going on from line 11 to 14.I am having problem in understanding the bold in line 12 and line 13.Plz help..... 1. public class Animal { 2. String name; 3. Animal(String name) { 4. this.name …

Member Avatar for stultuske
0
112
Member Avatar for Nidhi S.

[CODE]import java.awt.*; import java.awt.event.*; import java.awt.image.*; import java.io.*; import java.sql.*; public class RefHistTest { public static void main(String args[]) { int iw2, ih2; Image img2; int pixels2[]; double[] hist2 = new double[256]; int y; ResultSet r; try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection c=DriverManager.getConnection("jdbc:odbc:CBIRS"); Statement st=c.createStatement(); r=st.executeQuery("select Images from ImageTable"); byte[] bytes=null; while(r.next()) …

Member Avatar for Nidhi S.
0
104
Member Avatar for celiz45

can anyone provide with java code for performing text similarity calculation using cosine similarity. it is a part of my project.. the context is a pair of records P12 = {r1,r2} , where r1 and r2 can come from same or different data sources, as a similarity vector V12 = …

Member Avatar for stephen84s
0
93
Member Avatar for pradn

Hello, I am a new bee in developing large java projects so need your help in this regard. As a part of our project we need to upload a image to a site(say picasa) or any photo sharing site. I would like to know whether it is possible to retrieve …

Member Avatar for peter_budo
0
60
Member Avatar for shapam
Member Avatar for acash229

The timer is not working perfectly. it gives a very off estimate of the elapsedtime each time. Please Help [code] import javax.swing.*; import javax.swing.border.*; import java.awt.*; import java.awt.event.*; import java.util.Random; public class JumpingPanel extends JFrame{ public static final int BUTTON_WIDTH = 45; public static final int BUTTON_HEIGHT = 45; static …

Member Avatar for brandonrunyon
0
284
Member Avatar for nix_xin

[TEX]. . . i need some tips on programming java with looping structure, tnx . . .[/TEX]

Member Avatar for brandonrunyon
0
135
Member Avatar for raym.mart

Can someone help me solve this! thx Conditional structure , include also the console result. 1. Using switch case design and write a java application that takes as input a single letter and displays the corresponding digit on a telephone. The letters and digits on a telephone are grouped this …

Member Avatar for raym.mart
0
207
Member Avatar for sciprog1

Hello Members, I am trying to multiply two matrices using multithreading. I get a NullPointerException on the line that is commented in Bold. Following is the entire code. Any input is much appreciated. [CODE]import java.lang.*; import java.io.*; public class Matrix_Mult extends Thread { static int a[][]; static int b[][]; static …

Member Avatar for sciprog1
0
96
Member Avatar for redZERO

Hi everyone I have a project that I have created in Netbeans. I would like to deploy it as a JAR file, so i have "build"'ed it and I have a jar which runs nicely in the /dist folder. Problem is, the program in question requires reading from and writing …

Member Avatar for NormR1
0
2K
Member Avatar for blknmld69

I have 22 errors for cannot find symbol.....Please help! [CODE] import javax.swing.*; //needed for swing classes import java.awt.event.*; // needed for the action listener import java.awt.*; //needed for the boader layout class import java.io.*; //need for the file and IOException import java.util.Scanner; // needed for the scanner class import java.util.List; …

Member Avatar for NormR1
0
184
Member Avatar for GDICommander

Hello, everyone! I am unable to start a OSGI bundle. I'm using Apache Felix and this is my bundle: 1) Activator.java [code=java] package Example2; import java.util.Properties; import org.osgi.framework.BundleActivator; import org.osgi.framework.BundleContext; import Example2.Service.IDictionaryService; /** * This is the bundle. * @author Pierre-Alexandre * */ public class Activator implements BundleActivator { public …

Member Avatar for GDICommander
0
2K
Member Avatar for hajjo

Just a begginner question Object x = new Object(); System.out.println(x); everytime i get sthg. 16:18:35,222 INFO [STDOUT] --java.lang.Object@adfaec 16:19:26,937 INFO [STDOUT] --java.lang.Object@181db77 16:21:34,538 INFO [STDOUT] --java.lang.Object@14e5e21 what is the thing being printed? the object memory place? please help a beginner

Member Avatar for jon.kiparsky
0
83
Member Avatar for boiishuvo

I designed to look like that picture click here: [url]http://i195.photobucket.com/albums/z285/boiishuvo/eg.jpg[/url] But I got two errors shown below: Pizza.java:150: cannot find symbol symbol : constructor Labels(java.lang.String) location: class Labels localJPanel5.add("North", new Labels("PIZZA")); ^ Pizza.java:187: cannot find symbol symbol : constructor Labels(java.lang.String) location: class Labels localJPanel12.add(new Labels("PRICE")); ^ Can anyone fix that …

Member Avatar for Ezzaral
0
290
Member Avatar for geeks

Am developing an accounting system for my end year project. I intend it to be able to generate weekly report for sales. Is there any inbuilt java fuction for this@?

Member Avatar for Ezzaral
0
88
Member Avatar for gunjannigam

When we use File.getAbsolutePath() we get the path of file as C:\BlahBlah\Blah.txt. But I want the path name as C:/BlahBlah/Blah.txt i.e instead of backward slash "\" i want a forward slash "/" in the path. How to get this. I tried to create a parsefile method. [CODE] public String parsePath(String …

Member Avatar for JamesCherrill
0
182
Member Avatar for Shadow101

Hi, I wanted to created a java file base on the given javadoc below. I am currently stuck on the embezzle method. First, i don't understand what's the "BankAccount" in 'public void embezzle(BankAccount other)' do or is. Second, How can i add funds from the other account to the other …

Member Avatar for Shadow101
0
111
Member Avatar for sagar_wordlife

please any professional out there can suggest me with project ideas . . for my final year project work . . plz. .plz. .

Member Avatar for peter_budo
0
112
Member Avatar for 47pirates

I'm new to java , i've tried to make simple jdbc application . I can store a value in database and also can retrieve it but only in console window. i've got the variable String name in package db, and what should i do to display the value of that …

Member Avatar for 47pirates
0
301

The End.