32,199 Topics

Member Avatar for
Member Avatar for j23

basically, instead of the "(N1 + N2 + N3)" which is in the average method we need to call the sum method to the average method as the sum method returns a value = (N1 + N2 + N3). does anyone know how to call the sum method to the …

Member Avatar for hiddepolen
0
164
Member Avatar for naomi_01

Hi, I'm trying to have a set of random numbers into ArrayList and to print it. e.g. if the total number is 10, [2,3,5] or [1,5,2,2], etc. In below, it gives me each numbers but because y gets zero, it throws an exception. Can I have help to print all …

Member Avatar for Zaad
0
181
Member Avatar for herstein

Hey guys. I have been trying to write a progamme, and for some reason it doesn't give me the result I want. Anyway, here is a description of the programme I want: "Suppose that a is a positive integer. Suppose we repeatedly modify a as follows: if a is even, …

Member Avatar for hfx642
0
78
Member Avatar for loserspearl

I'm working on a random number guessing game with 5 tries that uses standard JOptionPane GUI and 3 methods, the requirements have each method doing a specific task. The main method starts a game is supposed to handle the 'you won' or 'you lost' dialogue and play again if the …

Member Avatar for loserspearl
0
1K
Member Avatar for vijaykavin10

Hi all... What is the purpose of built in class Say for example in event handling event class are : ActionEvent,MouseEvent,ComponentEvent,ContainerEvent... like that what is the purpose of this classes and in which case we are using this kind of the classes. Thanks...:)

Member Avatar for hiddepolen
0
82
Member Avatar for gedas

Hey guys, i need to write a small program to read the contents of a file, and do a "rot13" encode on the contents in java this is the link for image of rot13: [url]http://www.websters-dictionary-online.org/images/wiki/wikipedia/commons/thumb/3/33/ROT13_table_with_example.svg/320px-ROT13_table_with_example.svg.png[/url] i have no idea where to start and i need to complete this application before …

Member Avatar for hfx642
0
127
Member Avatar for heybunny

Write a while loop that will generate and print 100 random integers on the range [1,1000)? I cant get mine right, plz help. Also, i dont have JAVA so couldnt really check And also, if you can: Write a while loop that adds up all the odd numbers between 0 …

Member Avatar for Ezzaral
0
201
Member Avatar for LuckyLiza

I am fairly new to the Java lang and this is my first post so if I do it incorrectly please forgive me. Anyways, I am basically trying to find [LIST] [*]MaxInDegree [*]MaxOutDegree [*]MaxDegree [*]MinInDegree [*]MinOutDegree [*]MinDegree [/LIST] of a 2d array with various nodes. Here is what I have …

Member Avatar for hiddepolen
0
230
Member Avatar for programing

write a class Circle with one double data radius . write motheds ::: public Circle(),public Circle (double),public Circle (Circle c) public double getRadius() public setRadius (double) public getPerometer(int)where the parameter indicates the number of terms for π public getArea (int) where the parameter indicates the number of term for π …

Member Avatar for hiddepolen
0
200
Member Avatar for Jessurider
Member Avatar for Ezzaral
0
114
Member Avatar for Donieob

I have a JFreeChart XYPlot with many series, the number of different series depends on input parameters. I wish to colour the lines in groups of two, so that series_0 and series_1 are the same colour then series_2 and series_3 are the same colour. I tried the following solution but …

Member Avatar for Ezzaral
0
295
Member Avatar for ethio

Need correction on my answers and description on my errors. Q1 Which of the following statement(s) is true about an abstract class? 1. An abstract class cannot have any constructors. 2. An abstract class contains only abstract methods 3. An abstract class always implements an interface [B][U]4. An abstract class …

Member Avatar for ethio
0
122
Member Avatar for gahhon

as the question require to declare [CODE] // Creating Class Members public class Films { private String itemCode; private String title; private String description; private String language; private String runningTime; private String productionCompany; private String status; //eg, pending, premiering, running, written-off // No-argument Constructor: Without Parameters public Films() { itemCode …

Member Avatar for JamesCherrill
0
221
Member Avatar for cdea06

Could someone explain how the flow of control works with a nested for loop? [CODE]for (initialize; condition; increment) for (initialize; condition; increment) statement; [/CODE] I know a single for loop is: initialize --> condition --> statement --> increment--> condition -->.......

Member Avatar for JamesCherrill
0
123
Member Avatar for noXi

Hi, i've been looking around the web but could not find anything about the filestructure of the following file: [CODE]{"tickets":[{"name":"Test", "id":"906935000", "description":"gültig", "userID":"310000", "price":"Preis: 1,90€", "productID":"119", "checksum":"6017", "dailyCode":"u", "hourlyCode":"y", "barcode":"", "rebuyLink":"191000", "buydate":"52744", "buydateString":"17.08.2011", "legalNote":".", "validString":"gültig bis 17.08.2011", "demo":true, "validDescription":"gültig in 210"}], "currentMonthExpenses":"1,90€", "getMoreTicketsAvailable":false, "monthlyTurnover":170};[/CODE] This .dat-File is generated in javacode. …

Member Avatar for noXi
0
250
Member Avatar for nash_p

We have a mobile game application created using j2me. This application need to communicate with an asp.net wcf service to send/receive data in json format. I have created the service and uploaded on to server. The url is somewhat [url]http://xyz.com/TheService.svc[/url]. This service provides some methods for example - int add(int …

0
124
Member Avatar for Jessurider

can anyone please tell me how to edit the summary of a file(e.g *.txt,*.docs,*.pdf,*.avi.....etc) through by java programming.

Member Avatar for JamesCherrill
0
343
Member Avatar for Nandomo

I am doing Gui's on Netbeans and am writing a program that sells flower ornaments and such. I have everything added to an arraylist. But when it comes to showing, I am on another tab and need to pass the arraylist to that method for display, any help? Link me …

Member Avatar for Zaad
0
178
Member Avatar for Mideoan

Hello. I'm having some trouble understanding linked lists. I've been working on trying to figure this out all week, reading through the text, looking at examples and I still can't figure it out. This is due for me by midnight tonight, so I'm reaching out as a last ditch effort …

Member Avatar for JamesCherrill
0
187
Member Avatar for Sana'a Ala'a

so,i found a voice chat code that i tried to run it,but all i got was a list of "Reciever.java": Error #: 200 : <identifier> expected at line *, column *" this is the code ************************************************************************ Receiver.java ************************************************************************ [CODE] import javax.sound.sampled.*; import java.io.*; import java.net.*; import java.util.*; public class Receiver …

Member Avatar for harinath_2007
0
501
Member Avatar for Slyvr

I made a basic JUnit test to set up this oracle database on my computer with hibernate. The database works and everything, but trying to hook it up to Hibernate is proving to be a challenge. My config file is below: [code] <hibernate-configuration> <session-factory> <!-- Database Connection Properties --> <property …

Member Avatar for Slyvr
0
1K
Member Avatar for java.util

Hello, I have this little piece of code [CODE]System.out.println("Write a sentence: "); String sentence = tastatur.next(); String[] temp; String divider = " "; temp = sentence.split(divider);[/CODE] The problem is that when I enter a sentence only the first word gets stored in the string. For instance if I enter "dum …

Member Avatar for java.util
0
141
Member Avatar for Syrne

Hi guys, So for my next assignment I am required to, at some point, create a function that searches through an array of objects and sets a boolean value in a corresponding boolean array at the same position as the object in the object array, if that makes any sense. …

Member Avatar for ~s.o.s~
0
149
Member Avatar for ceyesuma

Hello. I was trying a new apache derby SQL prepardstatement to send numbers incremented form one into three tables. if it find the number in any of the tables than it is not the number I need to create the next primary key in my payment table. I am not …

0
54
Member Avatar for rafinrai

Is their any useful algorithm for drawing deterministic finite automata? I can prove that a dfa is accepted or not by my code but i do not have any knowledge about how to draw it in java.

Member Avatar for peter_budo
0
29
Member Avatar for sullivan757

I'm trying to figure out how to produce the following code: • Add person • Print all people (alphabetically by name) • Print all people of a designated type (faculty, staff, students) • Print a faculty member and the students who are studying the program taught by the faculty member …

Member Avatar for sullivan757
0
3K
Member Avatar for caswimmer2011

Hey, Is there a way to play a system beep on mac os x in Java? I usually use the beep function in Toolkit class for my PC but I tried the beep function in Toolkit but it doesn't work on my mac. Any help? Thanks in advance!

Member Avatar for harinath_2007
0
276
Member Avatar for Java2011

Hey i have a assignment in which i have a digital billboard its almost complete but i just have 1 line that is stopping my program from doing what its suppose to do. Im suppose to have a program that can display block letters when the user enters a word …

Member Avatar for Java2011
0
144
Member Avatar for daNiUB

Hello, I was wondering if anybody can help me write data fields for an instrument(Guitar) and the number of strings it has (6) and an array of string names representing string names (E,A,D,G,B,E). I have my code done for tuning and playing not sure how to do the other part: …

Member Avatar for ceyezumma
0
110
Member Avatar for kulpreet lkaur

hii i've java 1.6.0_11......n window 7...whnevr i try to save file in java\jdk1.6.0_11\bin then it gives a msg i.e you don't have permission to save in this location.contact to administrator to obtain the permision.... so um nt coming to kwon how to take permision from administrator and save my file... …

Member Avatar for kulpreet lkaur
0
140

The End.