32,204 Topics

Member Avatar for
Member Avatar for Hisham_3

Hello everyone, I have some problems with my program , hope you can help me to solve it. 1- I need a method for the** Clear Time** button that remove the counter to be 0. ` private void btclearActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: min=0;sec=0; lblsec.remove(lblsec); …

Member Avatar for Hisham_3
0
805
Member Avatar for Binisha

i am stuck at aparticular place and cant help myself. my professor asked me to built a notepad using .io and .awt pakages only and i am unable to do the save function in the notepad can anyone please help me

Member Avatar for tinstaafl
0
88
Member Avatar for tinstaafl

There are times when you need to make sure your counter starts at an odd or even number. Even is pretty simple - `counter = counter + modulus(counter)`. If counter is even it stays, if it's odd it gets incremented by 1. Odd is a bit more complicated - `counter …

Member Avatar for holisticgroup19
3
4K
Member Avatar for Uğur Kaan

where theuser tries to guess a 3 digit target number Whenthe user guesses a number, the computer • Prints k `+' if the guessed number has k same digits as the target number and also in their correct positions.

Member Avatar for rproffitt
0
123
Member Avatar for student_6
Member Avatar for Max_26

I have the following Java code snippet: Map<String, List<String>> phones = new HashMap<>(); phones.put("User1", Arrays.asList("0502324547", "0651634767")); phones.put("User2", Arrays.asList("0977634321", "0697654221")); phones.put("User3", Collections.singletonList("0970011223")); Map<String, String> map = phones .entrySet() .stream() .flatMap(e -> e.getValue().stream().map(v -> new AbstractMap.SimpleEntry<>(v, e.getKey()))) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); Using it I'm converting Map<String, List <String>> to Map<String, String> and then passing …

0
211
Member Avatar for Henry Williams

My name is Henry, and I started programming about 10 years ago. I always loved playing video games, even from a young age. That passion eventually turned into something much more. Learning programming languages is very popular at the moment. A lot of people leave their current workplaces to learn …

Member Avatar for JamesCherrill
0
301
Member Avatar for prem2

Hi, In C program Function has three parts, Function Declaration. Function Definition. Function Calling. In java i cannot able to declare a function .Is it possible to declare a function in Java. For example: [code] import java.io.*; import java.util.*; class Fun_example { // show();//Cannot able to Declare a Function ? …

Member Avatar for JamesCherrill
0
4K
Member Avatar for Nightocoder201

Hello, I am working a program that starts at a direction and goes to the destination and reverse. I have reversed the list and used a if statement for the switching the directions from R (Right) and L (Left) but it doesnt want to work properly. My question is how …

0
111
Member Avatar for Rawabi

Hello , in working on java program And i made 4 classes with main So they want me If the class if ( convener ) they want me to enter the id to dsplay the 1-allocate method 2- drop method 3-print report Dont know how to do it

0
101
Member Avatar for shantuli

hi everyone, i am very new in java. can anyone help me to solve the following problem: A school conducts a 100 mark exam for its student and grades them as follows: Grade: Grade A: Marks>75 Grade B: 75>Marks>60 Grade C: 60>Marks>50 Grade D: 50>Marks>40 Write ajava program to calculate …

Member Avatar for zunam
-5
81K
Member Avatar for Joseph_49

how would one convert this to python? var unlockedState = 1000; var lockedState = 2200; var motorPin = 14; var buttonPin = 4 var ledPin = 17 var blynkToken = 'blynk_token_here'; // *** Start code *** // var locked = true //Setup servo var Gpio = require('pigpio').Gpio, motor = new …

Member Avatar for rproffitt
0
579
Member Avatar for Ruba_3

class Node(object): def __init__(self, data): self.data = data self.nextNode = None class Queue(object): def __init__(self): self.head = None self.tail = None self.size = 0 def enqueue(self,data): self.size += 1 newNode = Node(data) if self.head is None: self.head = self.tail = newNode else: newNode.nextNode = self.head self.head = newNode def dequeue(self): …

Member Avatar for rproffitt
0
175
Member Avatar for Lilimae
Member Avatar for arian ahmadi
Member Avatar for AndreRet
0
109
Member Avatar for jeffersonalomia

Hi, Question. How does UserDetailsService catch the username that I have submitted in the custom login page which I have created? TIA :)

0
176
Member Avatar for Saboor880

I have written a code to generate bar codes and saved them to a pdf file . The code executes successfylly but the PDF file does not open saying giving an error whome picture I am uploading. Please see my code and Picture with the error. ![barcodeError.PNG](/attachments/large/4/466b7c7d36a50fd6f88d0a7f157907c8.PNG) public void createPDF(String …

Member Avatar for orichisonic
1
1K
Member Avatar for aaa801

Hi java coder here im converting a program into delphi for a project basicaly ive forgotten my whole delphi maths soo can anyone convert this into delphi [CODE](l1 & 0x2 ^ 0xffffffff) == -3;[/CODE]

Member Avatar for dausmus
0
271
Member Avatar for JluckyStrike

There is a network of tracks (list), tracks are of two types - standard (with one start and one end point) and with a fork ( one start and two end points). These points are called nodes. It is known that each track can only be connected to one other …

Member Avatar for rproffitt
0
214
Member Avatar for BrundyBoy

Hello! This is my first time trying to use Java, and I was trying to learn something with the "Scanner userInput" and ".nextInt()". After I put a bit of code on, it showed me: Exception in thread "main" java.util.InputMismatchException at java.util.Scanner.throwFor(Unknown Source) at java.util.Scanner.next(Unknown Source) at java.util.Scanner.nextInt(Unknown Source) at java.util.Scanner.nextInt(Unknown …

Member Avatar for JamesCherrill
0
244
Member Avatar for Jonathan_41

Im just learning javascript and want to make a code for a prank on my friend. I want it that when i plug in a certain usb it will pop up a fake virus alert after a couple of seconds, and when you exit off it will pull back up …

Member Avatar for Jonathan_41
0
263
Member Avatar for ビナ

Create a Java program that will compute for the average (Final Grade) of three (3) input numbers (Prelim, Midterm, Pre-final). The input grade should ONLY accept values ranges from 70 to 100, and will display a message if the input grade/s is invalid. The program should also be capable of …

Member Avatar for Reverend Jim
1
653
Member Avatar for seb33

Hello I have a abstract class: import javax.swing.JOptionPane; public abstract class Question { static int nQuestions = 0; static int nCorrect = 0; String question; String correctAnswer; abstract String ask(); void check() { nQuestions++; String answer = ask(); if (answer.equals(correctAnswer)) { JOptionPane.showMessageDialog(null,"Correct!"); nCorrect++; } else { JOptionPane.showMessageDialog(null,"Incorrect. The correctanswer is …

Member Avatar for JamesCherrill
0
254
Member Avatar for seb33
Member Avatar for MagnusTheRed90

Does anybody know a good way to break a screen up into multiple sections for filling out lengthy multi section data? I would like something that I can break data inputs up into sections and move onto the next section when I finish filliing out a section prior, sequentially. What …

Member Avatar for rproffitt
0
275
Member Avatar for xxunknown321

I have a program that i need to convert from java to c++... i just need help doing it... heres the java: [code] /* Name: Joseph Coleman Class:CSCI 1302 Assignment: Employee + ProductionWorker Academic Honesty: The integrity of students and their written and oral work is a critical component of …

Member Avatar for jimmichaels29
0
1K
Member Avatar for Vin vin

I made a JavaFX Discord Server for people who like to talk about JavaFX stuff, or need help with certain projects, I really like to work with java, especially with people who are working with JavaFX (: Here is the discord link: https://discord.gg/yZ3Y3Fd or https://discord.gg/AzFaNU

Member Avatar for Vin vin
1
916
Member Avatar for Vin vin

How do I make a cube in javafx that have 6 different textures on each side of the cube? The only way I know how to solve this, is by making 6 imageviews and give them each a specific coordinates that make them look like a cube. Is there a …

Member Avatar for Vin vin
0
2K
Member Avatar for Daron_1

public class HashedClass{ int ticketNumber; // keyfield string purchaserName; Hashtable hashtable = new Hashtable(); insert(); fetch(); delete(); update(); } I started a pseudocode above, but I know it needs more work. Are there any resources that can help guide me to implementing my …

Member Avatar for Icetutor
0
396
Member Avatar for MagnusTheRed90

I am crafting a code generator for something, and I have encountered some things that I do not know yet. Excuse the scambled eggs in this code, but could you please tell me what a job is, and how to get it to run a stored procedure for me? I …

Member Avatar for pritaeas
0
304

The End.