32,199 Topics

Member Avatar for
Member Avatar for Ahmet Gök

Hi, Mr Dani Horrowitz, Founder Java NetBeans 'random' numbers between 1 and 100 using the U set for myself, I'm single and multiple 10 to choose a number you want to create an array. I want to get these numbers from the output via single and multiple array and random. …

Member Avatar for Dani
0
126
Member Avatar for Violet_82

Hi all, I'm having some issues with the Scanner not waiting for input from the keyboard. The first method processChoice takes the userChoice and the idea is that in the switch statement there is a call to a method getUserInputForProcessing that takes the action and there scanner takes an input …

Member Avatar for Violet_82
0
1K
Member Avatar for kaleb2020

# Class 1 # import java.awt.Canvas; import java.awt.Color; import java.awt.image.BufferStrategy; import java.awt.Graphics; import java.lang.Runnable; import java.lang.Thread; import javax.swing.JFrame; import java.awt.image.BufferedImage; import javax.imageio.ImageIO; import java.io.IOException; public class Game extends JFrame implements Runnable{ private Canvas canvas = new Canvas(); private RenderHandler renderer; private BufferedImage testImage; private Rectangle testRectangle = new Rectangle(30, 90, …

Member Avatar for JamesCherrill
0
383
Member Avatar for Mohan_12

Hi All i am having a python code i have to convert this to java i have placed the code below import boto3 import sys import re import json def get_kv_map(file_name): with open(file_name, 'rb') as file: img_test = file.read() bytes_test = bytearray(img_test) print('Image loaded', file_name) # process using image bytes …

Member Avatar for rproffitt
0
580
Member Avatar for palash_1

hi, In my android studio build gradle is failed i dont know how so then i check the log and i saw this error Error:Could not find method compile() for arguments [com.android.support:recyclerview-v7:25.3.1] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler. Please install the Android Support Repository from the Android SDK Manager. Open Android …

Member Avatar for palash_1
0
741
Member Avatar for Daniel_118

# Find minimum integer coefficients for a chemical reaction like # A * NaOH + B * H2SO4 -> C * Na2SO4 + D * H20 import sympy import re # match a single element and optional count, like Na2 ELEMENT_CLAUSE = re.compile("([A-Z][a-z]?)([0-9]*)") def parse_compound(compound): """ Given a chemical compound …

Member Avatar for JamesCherrill
0
420
Member Avatar for Daniel_118

Is there a way to solve for a system of multiple equations with multiple variables and variables on both sides in java Lets say im given three (or more) equations in an array list or array like so... 4A=1C 10A=2D 2B=2C+1D and im allowed to set one variable equal to …

Member Avatar for rproffitt
0
329
Member Avatar for Vin vin

How can I minify my code in here, I am giving each 23 total imageview a eventhandler. code works, but I like to make the code shorter. I tried to use for loops to shorten the code. here is a example what I tried to do: for (int i = …

Member Avatar for JamesCherrill
1
1K
Member Avatar for Amit_66

when i am trying to insert date into the datefield of the oracle then date value are stored in to database but each date value are same like DOB 01-JAN-70 01-JAN-70 01-JAN-70 public class practicdate { JDateChooser dateChooser,dateChooser1; practicdate(){ dateChooser = new JDateChooser(); dateChooser.setBounds(200, 200, 150, 20); getContentPane().add(dateChooser); public void …

Member Avatar for RuMedia
0
486
Member Avatar for nxcx

package de.extrema.java; import java.util.Scanner; public class Pogramm { public static void main(String arrg[]) { try (Scanner scanner = new Scanner(System.in)) { double a , b , r , A , h; int number2; int number; System.out.println("Körper: "); System.out.println("Deine Wahl: "); number = scanner.nextInt(); number2 = scanner.nextInt(); switch(number) { case 1:{ …

Member Avatar for Nutster
0
377
Member Avatar for Sumanth_1
Member Avatar for Marshal_1

I'm writing a VERY simple clock to run on an old tablet using Android Studio - it displays the current time and day (I'm retired and regularly forget what day it is). I want to add the first calendar event for the current day to the display so it goes …

Member Avatar for RuMedia
0
246
Member Avatar for woomar

Hi. I was wondering if anyone could help me with checking for a valid move in Othello. I was thinking about hard=coding everything but that takes too long. this is what i have so far: 1. Check which direction is valid (adjacent piece is different from piece being placed) 2. …

Member Avatar for JamesCherrill
0
5K
Member Avatar for Tân_3

1/Write a TeachArithmeticFrame class that teaches children arithmetic. The frame uses a JLabel for a problem and a JTextField for the user answer. When the user presses the Enter key (while the JTextField object is active) or clicks the OK button, display a message stating whether the user’s answer is …

Member Avatar for rproffitt
0
311
Member Avatar for Tân_3
Member Avatar for tinstaafl
0
221
Member Avatar for kaleb2020

# Class 1 # import java.awt.Canvas; import java.awt.Color; import java.awt.image.BufferStrategy; import java.awt.Graphics; import java.lang.Runnable; import java.lang.Thread; import javax.swing.JFrame; import java.awt.image.BufferedImage; import javax.imageio.ImageIO; import java.io.IOException; public class Game extends JFrame implements Runnable{ private Canvas canvas = new Canvas(); private RenderHandler renderer; private BufferedImage testImage; private Rectangle testRectangle = new Rectangle(30, 90, …

Member Avatar for rproffitt
0
327
Member Avatar for Mariam_9
Member Avatar for Amna_5

I have developed a game for android mobiles ["Rise Up Air Balloon"](https://play.google.com/store/apps/details?id=com.abacus.riseup). I want to updatte it. Kindly suggest me something if it is better to update https://lh3.googleusercontent.com/rB-fPEBiaGzT_ubSzCtSfftC4pKkIm5buAS2_DhQz4_exYFCrjbcN2T1NhkmM0A3Jj0=s180-rw

Member Avatar for Antionne
2
1K
Member Avatar for bastianemutan

Hello everyone, I am Bastian, i would be very grateful if anyone could help me on this one. I want to self-study about creating a Hotel Management program in Netbeans but i am afraid that i just have a basic knowledge in Java. I studied Programming but unfortunately i have …

Member Avatar for rproffitt
0
276
Member Avatar for Kaleb_1

It's not showing the image in the terminal window or the jframe. import java.awt.Canvas; import java.awt.Color; import java.awt.image.BufferStrategy; import java.awt.Graphics; import java.lang.Runnable; import java.lang.Thread; import javax.swing.JFrame; import java.awt.image.BufferedImage; import javax.imageio.ImageIO; import java.io.IOException; public class Game extends JFrame implements Runnable{ import java.awt.Graphics; import java.awt.image.BufferedImage; import java.awt.image.DataBufferInt; public class RenderHandler{ private BufferedImage …

Member Avatar for JamesCherrill
0
314
Member Avatar for M_27

I made this game equivalent to tictactoe but with a slight twist called find the X between two players using socket programming with Java. Don't know where I went wrong in trying to find the X but for some odd reason my count variable never updates allowing the victory message …

Member Avatar for JamesCherrill
0
488
Member Avatar for Pepe_1

Good After. Can you please help. How to convert my python code into Java ? Need Help.. Espcially in Soil Moisture sensor using java language.

Member Avatar for JamesCherrill
1
954
Member Avatar for ArtisticWhile

Hello I'm writing a program that reads in data from a file to create an array of clients and stocks. I completed my client class and stock class. I'm stuck on my driver. ![Screen_Shot_2019-12-02_at_11_53_13_PM.png](/attachments/large/4/0ceae90458b69aa4d08f7e5937ba4a6e.png) This is what I have it prints the text file but where would I include the …

Member Avatar for JamesCherrill
0
240
Member Avatar for Speed_Freak5150

I am trying to get a program to work that asks for a user input to count by that number and display 10 numbers per line. I can not get it to display 10 numbers per line. If anyone can explain to me what I am doing wrong? public static …

Member Avatar for JamesCherrill
1
2K
Member Avatar for Azhan14

I have a problem that regarding with my projects. I need to create a bleuprint of an urban planning and I manage to print all the buildings that are required usning array. My problem right now is how I am going to print the roads. (<>^v, 1, -1, Road (-1 …

Member Avatar for rproffitt
0
253
Member Avatar for Teyhah

*someone can help me to answer this question. Create an array that can hold ten integers, and fill each slot with a different random value from 1-50. Display those values on the screen, and then prompt the user for an integer. Search through the array, and if the item is …

Member Avatar for rproffitt
0
295
Member Avatar for Rakshith Rahul

I'm a beginner and working on a digital attendance system. I'm using the following code in actionPerformed: for (int i = 1; i < count; i ++) { if (ae.getSource () == buttons[i]) { switch (available[i]) { case 1: { available[i] = 0; names.remove (unames[i]); System.out.println ("removing " + unames[i]); …

Member Avatar for JamesCherrill
0
256
Member Avatar for johnalexa

Hi, I am John and pursuing graduate, my question is why Java or oops language does not use multiple inheritance? This is nightmare for me. My exam is coming soon. Please provide me a good answer

Member Avatar for Deep986
0
356
Member Avatar for AquaGirl101

Hello Everyone!, I am currently a freshman at MATC(Milwaukee Area Techinal College) I am at the one Downtown in Milwaukee, and I am taking a class called Intro To Oriented Computer Programming(which is learning and coding the Program Java, and I have been seeing a tutor, but I cannnot figure …

Member Avatar for Dani
0
318
Member Avatar for Vrunda_1

Create a Project name Banking which will have the following classes with the given instance variables and the methods Create a class Account with first name , last name, address , phone number, balance (instance variables) Withdrawal and deposit methods Create checking account class extending the account class, Having additional …

Member Avatar for Reverend Jim
0
306

The End.