32,204 Topics
| |
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; … | |
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 … | |
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 … | |
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] | |
Hello, I want to know how to write java code to retrieve content and position of an xml element using sax parser. | |
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 … | |
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 … | |
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 … | |
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. | |
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 … | |
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 … | |
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 … | |
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 ? … | |
| 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 … |
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 = … | |
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 … | |
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? | |
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 … | |
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 … | |
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.. | |
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. | |
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 … | |
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? … | |
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 … | |
| 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 … |
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? | |
sir can you help in displaying the information of installed software on our computer.. | |
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 | |
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 … | |
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); … |
The End.