32,199 Topics

Member Avatar for
Member Avatar for farwajafri90

Hi everyone I have a question and I need your help I want to sort an array but I dont want to change the index I mean if I have an array Array[6,5,4,3,2,1] it will be like this 0 6 1 5 2 4 3 3 4 2 5 1 …

Member Avatar for jwenting
0
259
Member Avatar for Pyler

Suppose I have the following generic classes; Queue<T> KellysCoffee CheckOut and the following generic interfaces QueueInterface OrderLineInterface Suppose I want `KellysCoffee` to extend Queue class and implement `OrderLineInterface` This is how I've done it private class KellyCoffee<Order extends Queue<Order>> implements OrderLineInterface{} Now when I try to implement `CheckOut` public class …

Member Avatar for Pyler
0
295
Member Avatar for jwenting

Similarly, you can add more fields to an enum and simply provide accessor methods to retrieve them. For example you could change it to have an extra field indicating an output directory to write specific types of data to, and a getter method to return that directory.

Member Avatar for jwenting
0
245
Member Avatar for xrerd

i was tasked with writing a program that prints the question ”Do you want to continue?” and reads a user input. If the user input is ”Y”, ”Yes”, ”OK”, ”Sure”, or ”Why not?”, print out ”OK”. If the user input is ”N” or ”No”, then print out ”Terminating”. Otherwise, print …

Member Avatar for jwenting
0
2K
Member Avatar for sobias

Hello guys, I'm completely losing it. The question asks to emplement an electronic directory traverse in size a chosen folder (using JFileChooser)and print the structure with the calculated the size of each folder and file. Finding the file size is easy using File.io `getSize()`. However, to find the size of …

Member Avatar for JamesCherrill
0
308
Member Avatar for yaya123

i wrote a program that have four classes .one of these classes is Date : class Date { public Date(int year,int month,int day) } in other classes there are some method that one of they're input is Date for example public void f(Account account ,Date date) i want to write …

Member Avatar for dasi
0
256
Member Avatar for DawnofanewEra

Is there any simple way to create a txt file with its name come from the user input. Also the file will be stored in a specific location such as C:\Users for example. Here is what I do but doesn't work. import java.io.File; import java.util.Scanner; public class cITF implements ICommand{ …

Member Avatar for JamesCherrill
0
551
Member Avatar for Szabi Zsoldos

**This is intented for learning purposes, feel free to study the code** Create a drawing that looks like this (pyramid) The number should be incremented with the modulus.

Member Avatar for Szabi Zsoldos
-1
526
Member Avatar for ParPau

Have first part of program written. It will use enum array for month and average rainfall amount. It starts at January and runs through December. Second part is to ask user at what month they want to start (example, April). The printout would then start at April of year -1 …

Member Avatar for jwenting
0
267
Member Avatar for muhammad.sadaqat.3192

I need to put this http://www.khanacademy.org/cs/chaos-pong/4810465738752000" into a web page .But I don't know how i can do this.Please any one help me thanks.

Member Avatar for stultuske
-1
77
Member Avatar for Halkawt.Papula

hi , i want to add code to edit text feild (Jdatachooser ) in my code , how it ? i have attribute ( Date ) type Date to mysql . how to add below code ? try { String va_ID = txt_idParking.getText(); String va_numCar = txt_numCar.getText(); String va_Modelcar = …

Member Avatar for Halkawt.Papula
0
141
Member Avatar for ParPau

All, what I am trying to do is isolate markings (differences) in images. I have an unmarked image (I1), a marked image (I2) and a third image (I3). I would like to compare I2 against I1 and store the x,y (or array of pixels) of the differences (isolate markings). I …

0
176
Member Avatar for custurd122000

Im trying to write a code where the user inputs an expression and then prints the answer and the postfix expression my problem is the parenthesis are all off and I'm not sure how to get them to print normal or even do without the parenthesis at all For instance, …

Member Avatar for JamesCherrill
0
1K
Member Avatar for Builder_1

i intend to do my project of making browser or media player in JAVA.i need help..someone please guide me how to go about it...and someone has any other bright idea of some other project which he has made or which is unique in nature..please advice and help...will be grateful for …

Member Avatar for Builder_1
0
275
Member Avatar for mustafaaltup
Member Avatar for jwenting
-1
183
Member Avatar for Junior.frogie

I don't understand how JVM is so small. And also how it use memory in each device? Why do we have to understand about it.

Member Avatar for JamesCherrill
0
123
Member Avatar for ritu.bhandari.796

Hi, i'm trying to build a transaction reconciliation tool. For which i'm using permutation combination. I have total of n transactions from which m transactions must i have to take.On rest n-m transactions i want to apply permutation combination. How can be that possible. Please help

Member Avatar for Sky Diploma
0
85
Member Avatar for mstoltz1

Ok, so I just made this account because I'm super stuck. Basically I need to create a math quiz that takes a users input (1 through 12), have it spit out a question, i.e What is 5 x 12? however if the user enters 5, it must randomly generate a …

Member Avatar for JamesCherrill
0
2K
Member Avatar for DmytriE

I have now official decided that I would delve deeper in the world of computer engineering and software development. I am currently studying Java in my introductory course at school. While we're talking about arrays, loops, and string manipulation, I was curious about the idea of throwing exceptions. Let me …

Member Avatar for stultuske
0
136
Member Avatar for new_2_java

Hi all, I have a J2EE web application that I am integrating with LDAP to implment Password Reset functionality to allow AD users to change their own password. My code works at times, and sometimes it stops working throwing [code]LDAP error code 52, initializing SSL/TLS error.[/code] I don't know why …

Member Avatar for new_2_java
0
2K
Member Avatar for wasme

I'm a student who is interested in coding his own Minecraft mods and there by hoping to learn Java Code. I have already taken many courses on line (Youtube) but those courses only take you so far and they DO NOT help you out if, by some chance an error …

Member Avatar for wasme
0
193
Member Avatar for nikolaos

I am trying to understand the structure of .class file in Java. Wrote a very simple program : package javautilities; public class Class_File_Structure { public static void main(String[] args) { int a = 10; int b = 20; int c = a + b; } } used the command javap …

Member Avatar for nikolaos
0
379
Member Avatar for warlord902

I am thinking of making a website, which is a quite big one and may need scalability later on. I know a little bit of asp.net , php and j2ee but not much, so before I start I want to know which language would be the best choice to make …

Member Avatar for brodiebyatt
0
1K
Member Avatar for Raymond_3

this is my code, the problem the compiler is saying is i need an extra parentheses after 5 in get fahr, but i know that cant be it... help meeeeeee please :) public double getFahr() { if (tempUnit.equals('C')) { return (5(tempNum-32)/9); } else { return tempNum; } } public double …

Member Avatar for JamesCherrill
0
191
Member Avatar for ikel

I's like to simulate the behaviour of Dynamixel Pro's robot actuator, including the control table, please see [it here](http://support.robotis.com/en/product/dynamixel_pro/control_table.htm). I can simulate the robot actuator fine, but simulating the control table is a bit puzzling for me. The control table has address from 0 - 892. One way I can …

Member Avatar for JamesCherrill
0
299
Member Avatar for HacruLeian

i have a .csv file contain some name as below: William Shakespeare charlie chaplin david Copperfield and i'm supposed to write a java program that will turn the input above into the output below: WS cc dC but i still couldn't get the output that i want, i wanna ask …

Member Avatar for HacruLeian
0
1K
Member Avatar for yaya123

I am writing code that has classes like playlist,album,artist,song in playlist class i need to write a method that will play the first song public void play(){ //the code } what sould I write

Member Avatar for JamesCherrill
0
105
Member Avatar for kristian.ssyn

I've been trying to resize my jbuttons to the size of my pictures, but the jbuttons keep on occupying the whole frame. The size of the photos are 150x267. import javax.swing.*; import java.awt.event.KeyListener; import java.awt.*; import java.awt.event.KeyEvent; import java.util.Timer; import java.util.TimerTask; public class StartGame extends JFrame implements KeyListener { Timer …

Member Avatar for JamesCherrill
0
13K
Member Avatar for Richa_2

import java.util.Scanner; package p1; class Electricity { int cread=18634,fix_rate,due,ub_tax,curr_charge,bill,to_bill ; int pread,unit ; System.out.println("fix_rate="); Scanner sc=new Scanner(System.in); int fix_rate=sc.nextInt(); System.out.println("due="); int due= sc.nextInt(); System.out.println("ub_tax="); int ub_tax= sc.nextInt(); System.out.println("curr_charge="); int curr_charge= sc.nextInt(); System.out.println("unit="); int unit=sc.nextInt(); public void calc() { do { pread=cread-unit; System.out.println("fix_rate=" +pread); } while(unit<200) { int c1=2.75*unit; System.out.println(c1); } …

Member Avatar for Richa_2
0
294
Member Avatar for abhig

Write a program in Java to create an applet which take radius of a circle as input and find the area of a circle and draw the circle. Java Code: // Java Document import java.applet.Applet; import java.awt.Color; import java.awt.Event; import java.awt.TextField; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.geom.Ellipse2D; class Circle extends …

Member Avatar for JamesCherrill
0
442

The End.