25/09/2017 12:08
using the following program I get odd outputI think that 5 & 1 =1 but the BitSet says {} why is this? // BitSet Demonstrationimport java.util.*; class BitSetD { public static void main(String args[]) { BitSet bits1 = new BitSet(1); BitSet bits2 = new BitSet(1); bits1.set(1); bits2.set(5); System.out.println(Initial pattern in bits1: ); System.out.println(bits1); System.out.println( Initial pattern in bits2: ); System.out.println(bits2.... read more

3 answersclick here to view

24/09/2017 12:08
Hi there, After messing about with a few programs I'm now getting into IRC. Because a fewprograms which I used for quite some time now stopped working and because Ibecame unhappy with some eggdrop options (and lack off) and suspect it to beleaking memory I decided to write up something myself.
One of the main functions of this bot will be performing tutorial sessions. Atthe moment this consists of reading an ascii file which defines what text hasto be send into the channel. All of this is w.... read more

2 answersclick here to view

22/09/2017 12:08
I have been working as a programmer using C++ only for quite some timenow, I never felt the need to do any development under Java, but thathas now change; as we all know Java is not longer a programminglanguage that can be ignored. Thus I have decided to port or convert myC++ library to Java, but I have run in to a little bit of a problemwith the concept of package: Say for instance, if I have a class foo.java in a subdirectory named[.../dev/java/packages/package_one ] the file would look like t.... read more

6 answersclick here to view

19/09/2017 12:08
A while back, I had a program that I was working on, while taking Javain a Web Design & Development course -- this was back in 1999 -- nothaving the mindset of a programmer I failed that part of the coursemisrably. I had to do the following program, but you can see why Ifailed, I only managed to write to lines of code. I am wondering ifthere is anyone who can write it to the following criteria, maybe evenmake it graphical...I am hoping to try and write an XML backend to itlike I wanted to do in .... read more

4 answersclick here to view

16/09/2017 12:08
hi, i am making a program in blue j. it is about a hiring vans. wat i want todo is;when the mileage of the van gets to a certain number, i want the terminalwindow to say 'the van is on hire'.
this is the follwing code i have created so far, but i cant get the else bitto work.
public double getservice() { if (totalmileage >=10000 && totalmileage <= 10500) serviceStatus = true; System.out.println(Van is being serviced); if (totalmileage >=20000 && totalmileage .... read more

4 answersclick here to view

15/09/2017 12:08
Is there a way (pattern, ...) to enforce the Class B (example bellow) toimplement some factory method. Something that would have the same effect asthe flawed example bellow.
All classes that implement A should have to know how to instantiate somespecial case object of B.
Thanks for the help :-) public interface A { // !! Imposible static factory method // declaration in an interface public static A someFactoryMethodToImplement(); public void methodToImplement(A a);} public class B imp.... read more

4 answersclick here to view

14/09/2017 12:08
I need to use Collection b/c method I'm using (Email.setTo() from Jakarta Commons e-mail package (http://jakarta.apache.org/commons/email/apidocs/index.html) takes a Collection as a parameter...
but Collection has no constructors (of course, being an interface), so am trying w/ArrayList and Vector, but Vector and ArrayList's add() method takes an Object as parameter, but I need to add a string.. am getting ArrayStoreException..
so instead of String addOne = add@yahoo.com; did String a.... read more

7 answersclick here to view

13/09/2017 12:08
Respected sir, I want to highlight a good news that recently i get the help from theonline expert regarding Java programming , java installation,JDKETC .He is really a good expert that i never ever seen in life hehelps me 8 times in java programming and JDK .He is a very polite manand expert in java and also C,C#,C++ Etc .I want to say thanks to himvery much :) His contact link is here for sharing to all of you : www.liveperson.com/java-careline

2 answersclick here to view

11/09/2017 12:08
I have implemented the Dijkstra algorithm to determinate the shortest pathbetweem 2 rooms of a musem.
Every room has some attributes, one of these attributes is the period.
For example a room with period equals to '700 contains works made in theXVIIth century.
I would create a method that takes a period and makes a path. In this pathmust be all the room with periodo equals to the inserted period.
How can I do?Thanks.

1 answersclick here to view

09/09/2017 12:08
I have a jsp page that refers to a class defined in a .class file.
The code of the jsp, which is in path /webapps/test is: <HTML><HEAD> <TITLE></TITLE></HEAD><BODY><%@ page import=TestClass %><% TestClass t = new TestClass(); %><%=new java.util.Date()%></BODY></HTML> The class file is in path /webapps/test/WEB-INF ad its code is: import java.lang.*; public class TestClass{ public int number; public TestClass() { n.... read more

1 answersclick here to view

08/09/2017 12:08
Is Java capable of creating transparent graphics? I have an idea fora desktop application, and would like to have a transparent effect?Thank you in advance for your input.
Lee

2 answersclick here to view

07/09/2017 12:08
Hello all i have this script: public class Opgave1 { public static void main(String[] args) { K.ik = 5; } }class K { protected static int ik = 1; L I = new L(0); //K(){ik++;}}class L extends K{ int il; L(int p){ il = ++ik + p; System.out.println(il); }} My question is, why i dont get any output or error message? whatever i put in the system.out.println, it never executes

1 answersclick here to view

06/09/2017 12:08
Hi All,I have jdk1.7.0, using a Windows7 machine.
I am working on a programthat will reduce a jpeg image to aThumbnail sized jpeg image. My program sampleuses these three imports,among others. They are: import com.sun.image.codec.jpeg.JPEGCodec;import com.sun.image.codec.jpeg.JPEGEncodeParam;import com.sun.image.codec.jpeg.JPEGImageEncoder; my IDE lists the error aspackage com.sun.image.codec.jepg doesnot exist.
Is there a work around that will do the same thingbut without these import listed a.... read more

3 answersclick here to view

05/09/2017 12:08
I understand that java is supposed to be open source, and I found thesource for the JDK at http://openjdk.java.net/ but what I can't findis the source code for the java class libraries (or the JRE for thatmatter).
I know about the src.jar that comes with the JDK, but that doesn'thave the C that implement the native functions that the classlibraries call into, and that is what I need.
So does anyone know where I can find the *full* source tree for Javaincluding native libraries for the .... read more

2 answersclick here to view

04/09/2017 12:08
Hi, I have a program that generate web pages to view processesonline.(Generated in JRE1.3)The generate web page work fine on my local machine but when I try tolunch it from the Web Server I got this error message: AppletWebPublishApplet notinitiated and got an X in the place where the Javaapplet should be...
When I look to the Java console I've find this message: java.util.MissingResourceException: Can't find bundle for base namemodelapplet, locale en at java.util.ResourceBundle.throwMi.... read more

6 answersclick here to view

eDiscover
Helpforce eDiscover provides technical articles updated each day
Click the logo to go back to the main page
Java

Helpforce eDiscover RSS feed contains the latest technical articles in RSSWe have a vast archive of technical informationJava is a programming language developed by Sun Microsystems (which has since merged into Oracle) and released in 1995 as a core component of the Java platform. With many innovative features, Java is currently one of the most popular programming languages in use, particularly for client-server web applications, with a reported 10 million users.

Search eDiscover
  
Categories

Click an icon to go to that category

Helpforce eDiscover contains articles about Microsoft Windows Helpforce eDiscover contains articles about Apple products and MacOS Helpforce eDiscover contains articles about Linux and POSIX operating systems Helpforce eDiscover contains articles about Helpforce Helpforce has a large variety of technical information and articles for you to read Helpforce eDiscover contains articles about databases, MYSQL, SQL Server Oracle Helpforce eDiscover contains articles about Java, JVM and the JRE Helpforce eDiscover contains articles about the QNX operating system Helpforce eDiscover contains articles about Oracle Solaris and Open Solaris Helpforce eDiscover contains articles about RISC OS, Acorn and the BBC Micro Helpforce eDiscover contains articles about Amiga and AmigaOS