31,001 Topics

Member Avatar for
Member Avatar for heroes8453

Does anyone know where I can find information about writing a java application for a file dump utility, a java program that will read a file and display the contents of the file in a byte by byte format? I am lost on this one.

Member Avatar for jwenting
0
113
Member Avatar for kvass

Hey everyone~! I am having a major issue understanding class casting. I thought I understood it, but I found 2 problems in my Barron's book that seem to contradict in their explanations. Can someone please explain the distinction between these two problems??? [B][U]Problem 1:[/U][/B] [INDENT] Bird = Super class Owl …

Member Avatar for kvass
0
220
Member Avatar for ef32

Hello , am new here and i need some help in finding prime numbers.....I actually wrote this code below and it compiles but it repeats sequence with some numbers or most, plus if you run it you will see that the prime numbers are printed as prime numbers only but …

Member Avatar for mrnutty
0
125
Member Avatar for musthafa.aj
Member Avatar for musthafa.aj
0
3K
Member Avatar for beGinneR24

Hello, i am just starting with Java and one of the programs is, to make a long story short, evaluate a computers power (pretend). you put in how many applications you want to run, what operating system and what power your computer is and it tells you whether you can …

Member Avatar for beGinneR24
0
95
Member Avatar for rsaska

Hello, I am studying for SCJP 6 Exam, and came across this question which shows code as asks for the output [CODE] 3. public class Ebb { 4. static int x = 7; 5. public static void main(String[] args) { 6. String s = ""; 7. for(int y = 0; …

Member Avatar for rsaska
0
222
Member Avatar for solomon_13000

Why is it that when I invoke the Derived constructor from the main method, I get a compilation error pointing to the Derived constructor of the Derived class. I never called the Base constructor of the Base class. Therefore why is the error happening?. [CODE] class Base { private Base() …

Member Avatar for PatrickSharp
0
127
Member Avatar for Siren88

Hi, My assignment is to write static methods to give the following output: - Lists of all the sequences, all the perms, all the sets, and all the multisets with n=5 and k=3. -The [I]N Queens Problem[/I] considers how many ways n queens can be placed on an n by …

0
58
Member Avatar for jorgelex008

Hi all, I've got a main form, and a secondary form (this being a list from which I pick a number). I can store values as "global" variables - so as to bring the value across different classes. Also I've managed to get the main JFrame to display the value …

Member Avatar for jorgelex008
0
166
Member Avatar for java_programmer

Hi, I have another question. What is the advantage of arraylist over vector. Why arraylist is widely used instead of vector in java programming? Thanks in advance.....

Member Avatar for BestJewSinceJC
0
117
Member Avatar for mahdi68

Hi i install openJDK on fedora 12 , after run eclipse this message shown : [QUOTE]JVM terminated. Exit code=-1 -Xms40m -Xmx256m -XX:MaxPermSize=256m -Djava.class.path=/home/mahdi/App/eclipse//plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar -os linux -ws gtk -arch x86 -showsplash /home/mahdi/App/eclipse//plugins/org.eclipse.platform_3.3.201.v200909170800/splash.bmp -launcher /home/mahdi/App/eclipse/eclipse -name Eclipse --launcher.library /home/mahdi/App/eclipse//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.0.200.v20090520/eclipse_1206.so -startup /home/mahdi/App/eclipse//plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar -vm /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/bin/../lib/i386/client/libjvm.so -vmargs -Xms40m -Xmx256m -XX:MaxPermSize=256m -Djava.class.path=/home/mahdi/App/eclipse//plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar[/QUOTE] please help me what …

0
74
Member Avatar for chama89

I'm working on a Java program that is calling sqlcmd. It works perfectly on a computer with SQL server installed, but not at all on a computer that doesn't. I want to include the necessary exe and dll files to run this command in my jar. Anyone know which ones …

0
52
Member Avatar for JuneM

I need to create a JApplet containing a JLabel and a Jbutton. a JButton should automatically change font typeface, style and size when clicked. I have this coding so far : import javax.swing.*; import java.awt.*; import java.awt.event.*; public class JChangeFont extends JFrame implements ActionListener { JLabel name = new JLabel …

Member Avatar for verruckt24
0
98
Member Avatar for kgkamaraj

Hi friends, This is not java technical question. I am doing project java thats why i am posting here. I am doing project for SUMMARIZATION OF DOCUMENT. I finished 90 percent of my project. To test my project i need Data Set ( That means, Document with summarization ) . …

Member Avatar for kgkamaraj
0
122
Member Avatar for ahmedshayan

I am faced this Problem that I can't print display parent's content. Please help: [CODE] import javax.swing.JOptionPane; public class BinaryTree { private Node root; BinaryTree() { root = null; } //------------------------------------------------------------------ void buildTree() { String n=JOptionPane.showInputDialog("Root Information:\nEnter Name: "); int a=Integer.parseInt(JOptionPane.showInputDialog("Root Information:\nEnter Age of Root:")); String s=JOptionPane.showInputDialog("Root Information:\nAlive or Dead?"); …

0
73
Member Avatar for musthafa.aj

i coding these line ... it is working fine.... but what i need is compress that [COLOR="Red"]Bufferedimage [/COLOR] before getting it as [COLOR="Green"]Raster[/COLOR] i tried jpeg compreesion but it return bytestream instead of int.. so i got exception "can't cast BufferdByte as BufferedInt"... [CODE] [COLOR="Red"]Bufferedimage [/COLOR]image=robot.createScreenCapture(new Rectangle(width, height)); ////here i …

Member Avatar for masijade
0
167
Member Avatar for Dedodido

Hi, I'm writing a small program to simulate a projectile moving through air in a gravitational field. I have several classes for vectors, the gravitational field, and the projectile itsself. However, when constructing any of these objects in the main method, I get a "cannot find symbol" error, despite the …

Member Avatar for Dedodido
0
132
Member Avatar for Mueni

Hey everyone. i am stuck with some work kindly help A.S.A.P!! Its for Java. Thanx!! 1. Write an application that reads an integer and determines and prints whether it is odd or even. Hint use the remainder operator 2. Write an application that reads two integers, determines whether the first …

Member Avatar for javaAddict
-2
209
Member Avatar for new_2_java

Hi all, In my program I need to create 2 log files, success and error. But I need to create either one of them, depending on the out come of the program execution. In other words, if program fails for any reason, I need to create the error log file …

Member Avatar for kvprajapati
0
1K
Member Avatar for purewinz

I'm trying to get a square on a checkerboard to become highlighted when the user clicks on the rectangle. I created all my squares using fillRectangle methods. I'm not sure how to begin implementing this in the mouse adapter. Only the border of the square needs to be highlighted. Would …

Member Avatar for kvprajapati
0
84
Member Avatar for chixm8_49

Hello! I am about to load details from a file and save it to a node. I am having an error regarding to a certain code. Here's the code:: [CODE]boolean loadFromFile(String filename) throws Exception{ boolean b = false; try{ FileInputStream myfile = new FileInputStream(filename); ObjectInputStream in = new ObjectInputStream(myfile); do{ …

Member Avatar for kvprajapati
0
84
Member Avatar for kgkamaraj

HI, Can any one know how to convert byte array into char array. For example : byte buf[]=teststr.getBytes(); Note: buf is byte array. I need to convert this into char array.

Member Avatar for kgkamaraj
0
207
Member Avatar for Web_Sailor

Hi all, I have a java swing based client server application. The GUI is in swing and I am using glass fish as my server. Is there a way or any software available to create an environment where I can test my application by creating virtual user connections so that …

0
66
Member Avatar for Fulladder

Hello I am learning Java at my spare time as a hobby. It only been a week and at the moment I am trying to get my head around the following things fields, constructor, accessors etc. There is an exercise which I ma having trouble with: [U]Human [/U] 1. Create …

Member Avatar for BestJewSinceJC
0
138
Member Avatar for sedai77

I wanted to create a java program usig arrays. The program uses the file to input student name, city, grades scores and gender information. From this information the percent and letter grade should be calculated. how do i start?

Member Avatar for BestJewSinceJC
0
133
Member Avatar for dlong1969

I am trying to figure out how to check for carriage returns in a string. I am reading file contents into a string variable, and need to check if x0D is present (carriage return). I have tried indexOf and matcher so far with no results. Any input would be helpful. …

Member Avatar for masijade
0
219
Member Avatar for gedas

hey guys, new to gui java. i found some code and have no idea what it does could somebody explain it to me please and help me understand how it could be changed it something more readable [CODE] try { URL url = this.getClass().getClassLoader().getResource(ref); sourceImage = ImageIO.read(url); } catch (IOException …

Member Avatar for jwenting
0
79
Member Avatar for jralexander137

So I have to create a method that creates a custom arrow object and then returns it. No drawing is to be done in the method, it will be drawn once it's returned. I think I'm utilizing GeneralPath the correct way and then casting it to a shape properly but …

0
73
Member Avatar for 23Zone

Hi all, I am pretty much new to Java (I've had experience in C++) and have been working on a "simple" FTP client. I pretty much ended up with the code below. Problem is I get a lot of errors mostly related to the IOException in each method. The errors …

Member Avatar for 23Zone
0
127
Member Avatar for gedas

hey guys, i am trying to create a simple menu using canvas for example [CODE] class Name extends Canvas{ MenuItem menuitem; public Name(){ JPanel panel = (JPanel) container.getContentPane(); panel.setPreferredSize(new Dimension(800,620)); panel.setLayout(null); setBounds(0,0,900,600); panel.add(this); setLocation( 0, 20 ); MenuBar menuBar = new MenuBar( ); Menu menuFarm = new Menu( "About" ); …

Member Avatar for Ezzaral
0
99

The End.