473,322 Members | 1,703 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

importing keyboard

ive literally only started java in college but am familiar with c++

im trying to import the keyboard...i downloaded the class and mapped it but it aint working..is the fault in my code?? please help and thank you


Expand|Select|Wrap|Line Numbers
  1. import java.io.*;
  2. import keyboard.*;
  3. public class course2
  4.  
  5. { public static void main(String[]args)
  6.  
  7.  
  8.  
  9.     {
  10.                 int student=0;
  11.                 int groups=0;
  12.                 int noGroup =0;
  13.                 noGroup = student % groups;
  14.  
  15.                 System.out.println("Please enter the amount of student participating:");
  16.                 student=Keyboard.readInt();
  17.                 System.out.println("");
  18.                 System.out.println("Please enter the amount of groups:");
  19.                 groups=Keyboard.readInt();
  20.                 System.out.print("");
  21.                 System.out.print("");
  22.                 System.out.println("When all of the students have been divided equally into ");
  23.                 System.out.print(groups);
  24.                 System.out.print(" groups");
  25.                 System.out.print("There shall be ");
  26.                 System.out.print(noGroup);
  27.                 System.out.print(" left without a group.");
  28.                 System.out.println ("");
  29.  
  30.  
  31.  
  32.         }
  33. }
Oct 1 '13 #1
1 1750
Resolved fixed myself...had to use scanner
Oct 1 '13 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: skearney | last post by:
When I was in boy scouts, as part of learning Morse code, I was told that the inventor of the typewriter originally put the letter 'e' under the left middle finger, just below its present position....
13
by: Steve Jorgensen | last post by:
Well, it seems that Microsoft, or whatever powers that be have decided it's time for us to have yet another standard keyboard layout change. I think I see that the point of this one was to reduce...
3
by: Jon Weston | last post by:
Hi there. I'm trying to import DOS characters with foreign accents (grave, acute, circumflex, etc) into Text fields in a table in Access97 but Access seems to be converting them along the way. ...
2
by: Rudi | last post by:
Hello all, posting my question in this newsgroup is about the last alternative I can think of to resolve my problem. The standard keyboard layout in the office is AZERTY. Still, my access xp...
23
by: herrcho | last post by:
What's the difference between STDIN and Keyboard buffer ? when i get char through scanf, i type in some characters and press enter, then, where do the characters go ? to STDIN or Keyboard...
7
by: Don Riesbeck Jr. | last post by:
I'm working on an application (OEM) using C# that utilizes input from a keyboard, and USB Barcode Scanner. The scanner is a HID Keyboard device, and input from it is sent to the system as if it...
0
by: rs | last post by:
Hi guys, I am trying to read from a USB keyboard using vb.net and HID classes. the USB keyboard is not my primary keyboard. I have a ps2 keyboard connected and is detected in device manager as...
2
by: rs | last post by:
Hi guys, I am trying to read from a USB keyboard using vb.net and HID classes. the USB keyboard is not my primary keyboard. I have a ps2 keyboard connected and is detected in device manager as...
331
by: Xah Lee | last post by:
http://xahlee.org/emacs/modernization.html ] The Modernization of Emacs ---------------------------------------- THE PROBLEM Emacs is a great editor. It is perhaps the most powerful and...
4
by: =?Utf-8?B?QmVu?= | last post by:
Hi, How can select a single word of text, in any application, e.g. Windows Explorer, Internet Explorer etc. , without double clicking it and instead use a combination of mouse and keyboard, for...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.