32,204 Topics

Member Avatar for
Member Avatar for girl.java

what is the main function for this variable in the code [CODE]int n= 1;[/CODE] [CODE]import javax.swing.*; public class Qustion3C{ public static void main (String args[]){ int[] a={1,4,9,6,1,9,7,8,2}; int x; int n= 1; <<<<<<<<<<<<<<<<<<<<< wondering about this String c; c= JOptionPane.showInputDialog(null, "please Enter x value"); x= Integer.parseInt(c); for (int i=0; i<a.length; …

Member Avatar for JamesCherrill
0
105
Member Avatar for algo_man

Hello everybody, I'd like to implement an application of rooms and doors as follows; room has identification number and description, e.g. Art Hall. room has one or more door(s) in one direction, e.g. door 1 allows you to move from room 1 to room 2 not the way around. Each …

Member Avatar for JamesCherrill
0
108
Member Avatar for leliana

hi..i'm new in java programing .. sorry but i don't know where i should write my question.. i have this program "FTP client " with 2 errors .."illegal start of expression " and "134 error "class ,interface ,or enum expected " i checked "{} ()"...can you help me plz?[CODE] import …

Member Avatar for majestic0110
0
151
Member Avatar for touch me not

after executing that I was expected all rgb values but the output is rgb values with negative sign and containg each value more than 6 digits please help me soon[code]int w=bufferedimage.getWidth(); int h=bufferedimage.getHeight(); int [] rgb=new int[w*h]; bufferedimage.getRGB(0,0, w, h,rgb,0,w); for(int i=0;i<rgb.length;i++) { System.out.print(rgb[i]+" "); }[/code]

Member Avatar for JamesCherrill
0
71
Member Avatar for thandarucsy

Hello, I want to know how to write java code to retrieve content and position of an xml element using sax parser.

Member Avatar for servicecycle09
0
126
Member Avatar for ahmedshayan

This is the Program I am try create ! Create a class CoffeeCup with a double instance variable temperature. Provide a parameterized constructor, an accessor/getter, and a mutator/setter. It may be noted that 75 degree Celsius is considered best temperature for coffee to be served for drinking. Create another class …

Member Avatar for ahmedshayan
0
332
Member Avatar for AZSooner

I am creating a Video class, then creating objects to place into an array. Then I want to print the contents of the array: [CODE=java] public class Video { String videoTitle; int videoRating; public Video (String pVideoTitle, int pVideoRating){ videoTitle = pVideoTitle; videoRating = pVideoRating; } } [/CODE] [CODE=java] public …

Member Avatar for Mikeyp926
0
6K
Member Avatar for mor6

Hi i`m new to java however i have been given a piece of coursework. What it wants me to do is basically store strings in a binery tree however when i test it my count method does not seem to be working what its supposed to do is see how …

Member Avatar for cale.macdonald
0
86
Member Avatar for saisindhu.v

i copied comm.jar file in jdk.still im getting an exception "class not found:serialporteventListener.if im executing in IDE it is working fine. but if im trying to executing outside of IDE.im getting error. can any body help me. thanks in advance.

Member Avatar for javaAddict
0
40
Member Avatar for Benderbrau

Hello, I'm new to hashtables in C#, and I'm trying to refer to a bit of Java code, but having a problem. Here's the Java... note: adjacencyMap is a Java hashmap. [CODE] int count = 0; for (int i=0; i< adjacencyMap.CAPACITY; i++) { if (adjacencyMap.keys[i] != null) { LinkedList edges …

Member Avatar for avirag
0
127
Member Avatar for kharri5

Does anyone know how to fully set up a circular linked list, and its methods, remove, insert, and find? Here is what i have so far but i have no idea if its proper public class CLL { public class Node { int item; Node next; public Node() { this.item …

Member Avatar for roopa09
0
171
Member Avatar for the_Famous

i need help to count lines, paragraphs and articles ("a","an","the") in txt file with java. here is what i've got know:[code] import java.io.*; import java.util.*; public class Main { public static void main ( String[] args ) throws FileNotFoundException, IOException { String line=" "; char t=9; String s=""+t; int lines …

Member Avatar for javaAddict
0
101
Member Avatar for beforetheyknew

Hi guys, I'm returning this, it is similar to how you percieve dollars, $"32.95" etc. I calculate it in cents which is an int, but the problem is the second half cuts off the 10s of cents part if the number is less than that. eg/ 32.08. Any ideas ? …

Member Avatar for gunjannigam
0
79
Member Avatar for 9w43

I have no idea what to do, it keeps on saying can not find constructor Time(int, int) here is my Patient Class [CODE] //Patient Class store patient details such as name, age /* * Field declaration for patient, which stores each input to indicated type * p stands for patient …

Member Avatar for gunjannigam
0
209
Member Avatar for girl.java

hi all this is my code i got an error but unfortunately i can't see it:( please help me.... [CODE] public class QUSTION5 { public static void main (String args[]) { double n = 20; int counter= 0; for (int t =0; t<=25; t++) { n= (220/(1+10*Math.pow(0.83>,t))); System.out.println("At t = …

Member Avatar for girl.java
0
111
Member Avatar for Hanyouslayer

I made a program that stores a collection of CDs. This collection is entered in a BinarySearchTree and contains the Artist, Album, favorite song, track numbers, and cost of cd. The inorder traversal works to print everything in the tree, and the cdPrintGroup method prints all the Artists(aka groups), but …

0
81
Member Avatar for Stefano Mtangoo

How do programs like easy eclipse get compiled to exe? I'm learning Java in windows and would like to have exe rather than Jar. Also does exe depend on JRE's VM?

Member Avatar for Stefano Mtangoo
0
177
Member Avatar for kumaran21

Hi everyone, I'm preparing for my Java module exam and I'm going through previous term papers. I have completed some of the questions and I need someone to check my answers and tell me if I have done it the correct way. The questions are as below, [B]a) Briefly explain …

Member Avatar for Perveance
0
313
Member Avatar for jotha buddhi

I'm creating a simple desktop application using java. For that I would like to create my own look and feel. But I feel helpless .... Could anyone provide me guidelines in doing this.. If possible would you please provide me some useful, simple websites (explaining the basics) regarding swing-look and …

Member Avatar for peter_budo
0
109
Member Avatar for jotha buddhi

Is it possible to apply gradient color to the GUI components directly in netbeans without using paint() method..I tried well but I couldn't find 3D colors..

0
45
Member Avatar for yilmazakyildiz

i cannot wtch the videos in facebook. it asks to install java and gives a site but i could not install it even after i could download the file. thnks.

0
99
Member Avatar for Shaitan00

I am trying to serialize a List which looks as follows: [Code] public class Comp { public enum TYPE { Type1, Type2, Type3 }; public Type type; [/Code] So, I create a list of these like this: [Code] Comp a = new Comp(); a.type = Type.Type1; Comp b = new …

Member Avatar for peter_budo
0
150
Member Avatar for absk

I have been coding in C++ for a few years now and am comfortable with OOP concepts and Data Structures. Now I wish to pursue a higher level language which will hwlp me in application development. After much reading, I arrived at C# and Java. Which one should I pursue? …

Member Avatar for peter_budo
0
159
Member Avatar for CuteCat

I want to put music and sounds into the game I'm working on... Since the most common music-file is .mp3 and I don't know how to change it to another type, I'm worried that I won't be able to find the sounds I want - or any sounds at all …

Member Avatar for jbennet
0
90
Member Avatar for 9w43

Hello, I have a class named Time and when I run it I can enter the time, increase the hours and minutes, the minutes and hours will stored in their fields. I have another class called TimeTest, when this class is running, it needs to display the test results of …

-1
86
Member Avatar for absk

I have this Java program which gives an output that runs into 10000s of lines. I use Windows. When I run the program in cmd, It doesn't show more than around 500 lines, how do I see all my output?

Member Avatar for absk
0
76
Member Avatar for Narvind Pise
Member Avatar for matt01986
0
32
Member Avatar for Stefano Mtangoo

Hi all, I need to draw simple lines on JFrame/JPanel. What is the easiest method to go? Also what do I need to display an image on JFrame/JPanel Thanks

Member Avatar for Stefano Mtangoo
0
5K
Member Avatar for lidyaMikhail

hello i have a python chat server (multi client) and i wanted to connect a java client to it but i have been searching alot about java-python connection and i got solutions like using APIs as YAML or SOAP but i just can't figure out which one or if there's …

0
49
Member Avatar for ucas

Hi. I need some help. That's a snippet of the class. [code=java]public constructor ( ChooserListener callback ) { // that's a constructor super(); Loader.load(); this.callback= callback; JFrame frame = new JFrame(); frame.getContentPane(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.add(this); frame.setSize(300,330); frame.setVisible(true); JPanel lectures = new JPanel(); String items [] ={BLANK,COMP,EIMC,MATH}; JList list = new JList(items); …

Member Avatar for cale.macdonald
0
85

The End.