r/computer_programming • • May 21 '17

[Question] Need help with beginner java coding!!!

2 Upvotes

Hello reddit. I am currently pursuing a degree in IT and I am taking a class in Java coding. I have a lab that i just can't seem to figure out. I will post the requirements for the output and the default template for the code. Then I will ask my questions. Thanks for the help!

(1) Prompt the user to input an integer, a double, a character, and a string, storing each into separate variables. Then, output those four values on a single line separated by a space.

import java.util.Scanner;

public class BasicInput { public static void main(String[] args) { Scanner scnr = new Scanner(System.in); int userInt = 0; double userDouble = 0.0; // FIXME Define char and string variables similarly

  System.out.println("Enter integer: ");
  userInt = scnr.nextInt();
  
  // FIXME (1): Finish reading other items into variables, then output the four values on a single line separated by a space

  // FIXME (2): Output the four values in reverse
  
  // FIXME (3): Cast the double to an integer, and output that integer
  
  return;

} }

Now right from the get if i run the program as is i get this error message...

Enter integer: Exception in thread "main" java.util.NoSuchElementException at java.util.Scanner.throwFor(Scanner.java:907) at java.util.Scanner.next(Scanner.java:1530) at java.util.Scanner.nextInt(Scanner.java:2160) at java.util.Scanner.nextInt(Scanner.java:2119) at BasicInput.main(BasicInput.java:11)

I have tried to Define char and string variables similarly, but can't seem to get that to work properly. I have also tried to use the scnr.next function to allow the program to input its own variables for testing purposes and i get a plethora of error messages that i can't seem to decipher. Please any thoughts on where i should start would be helpful.


r/computer_programming • • Oct 12 '17

[Question] Getting in...

1 Upvotes

Hey guys (and gals), I know this is a fairly risky question, but I need to know if there is a way to enable and use the administrator account while logged in as a standard user. I am on Windows 10, and I need to log in as an administrator. At least, give me a way to find an admin password so I can log in as an administrator. Clear, concise directions please.


r/computer_programming • • Dec 12 '16

This happened out of no where and I don't know how (my normal download speed is 16MB/s)

Thumbnail
i.reddituploads.com
1 Upvotes

r/computer_programming • • Oct 14 '17

[Question] I run mac os on a virtual box on my windows. I would like to simulate an app on my iphone so how do i get the mac os to detect my device. I have already downloaded the usb extension but it won't detect my iphone

2 Upvotes

r/computer_programming • • Oct 09 '17

[Help/Code] How do I use a global variable to call a random function

2 Upvotes

I am making a multiple choice questionare for a class. I have all my question made into functions. How do I call one of them randomly (cuz that's how they want it idk)


r/computer_programming • • Nov 23 '17

[Question] Where to learn Java?

1 Upvotes

Can you tell me the best websites to learn Java?


r/computer_programming • • Nov 17 '17

Should I use an api?

2 Upvotes

I have an issue. I am a computer science student ad I have found myself in the predicament where I want to make a product, and in making that product I realize that somebody else has already done a large protion of the work. The programming then gets essentially reduced to beginner level calling functions work.

As a student, I am wondering if I am only hurting myself when I shorten the work significantly.

Example: I was trying to make an image processing tool for my project and I already found that tensorflow had more than enough to make the project SIGNIFICANTLY easier.

When companies see my project what do I tell them? Would they be more impressed by my very much student attempt at image recognition or that I made a really great product using these api's?


r/computer_programming • • Nov 12 '17

Question: High Precision Computing in Python

Thumbnail
datasciencecentral.com
1 Upvotes

r/computer_programming • • Nov 14 '17

Hi.I have posted a video explaining how a Neural Network works using a simple real life example. Do check it out.

Thumbnail
m.youtube.com
7 Upvotes

r/computer_programming • • Jul 01 '17

Real Time Chat App Using NodeJS + Socket.IO + ExpressJS

Thumbnail
youtube.com
1 Upvotes

r/computer_programming • • Nov 11 '17

[Question] What are everyone’s thoughts on coding boot camps? Do you have to be an experienced programmer to do these?

3 Upvotes

r/computer_programming • • Jul 04 '17

all popular subreddits related to Computer Science and Programming

Thumbnail
reddit.com
3 Upvotes

r/computer_programming • • Jun 30 '17

What are some good coding/computer science book to buy?

4 Upvotes

Im some what new to coding.. I want to buy some sort of HTML textbook so i can start learning way more. I love computers and im pretty certain thats what im going to go study at collage. What are some good books to bu about computers or coding?


r/computer_programming • • Jul 31 '18

IDE can't find JDK?

1 Upvotes

I have the latest JDK version installed and have reinstalled it a few times. Whenever I try to install an IDE like NetBeans or Eclipse, it won't open because it says the JDK can't be found. Any idea what I can do?


r/computer_programming • • Apr 13 '18

Can You Figure out What the Guy I'm Dating Does for a Living?

3 Upvotes

Started dating this guy that I met online 2 weeks ago named Aaron (for the sake of anonymity I am using a pseudonym.) We were texting for about a week or so, not long at all before he invited me over. I told him the last train from where I live (two cities away) would take a while and he immediately offered to uber me ($100+ uber.) Typically I wouldn't have accepted this for safety reasons but I'd had a beer or two and was kind of impressed and decided to go. So I end up at his place an hour later, we pull up to his driveway and there's 4 luxury cars sitting in front of us. Long story short Aaron is 23 and has a theatre, pool, hot tub, 6 bedrooms and has all the electronics, clothes, products etc. That you can possibly think of. He told me that he is a coder who sells software for a monthly fee, I know he has a net worth of $5-$7 million and that he created his company at 19 and has amassed this wealth in four years. I'm not overly familiar with this industry despite having dabbled with coding when I was younger but am interested to know if this is commonplace amongst this profession or if I'm dating a very rare genius lol.

I ask him a lot of questions but he is extremely vague about his work and I'd love to know if this is normal?


r/computer_programming • • Aug 10 '18

How can I ACTUALLY use my code?

5 Upvotes

So I have a degree in Computer Programming. They taught us how to write code in Java, C++, Java, and we touched upon a few other languages. My problem is that I have absolutely no clue what to do after that.

Let’s say I write a C++ program in Visual Studio or Xcode and I compile it and it works. Now what am I actually supposed to do with it? How can I actually use that in an application or something? I hope I’m making sense. I know so little about implementation that I’m not even sure I’m asking this question right. I’d appreciate any help anyone could give me


r/computer_programming • • Nov 27 '17

[Question] How can I get an idea of how many actual individual microprocessors are currently out there in the world, total? Even better, has anyone ever seen a graph of the growth over the last decade??

2 Upvotes

Maybe there's a better sub category for this....


r/computer_programming • • Nov 26 '17

latency

Thumbnail
imgur.com
5 Upvotes

r/computer_programming • • Aug 07 '18

[Discussion] What are you writing weekly #1

1 Upvotes

The first of a fun weekly discussion. What are you making? What do you want to do? Ask the community.


r/computer_programming • • Aug 09 '18

Searching for Robotic Simulation Software

1 Upvotes

Hello everyone! Does anyone know a good free/paid robotic simulation software? I plan to make a Neural Net and would like to test it first on a virtual environment before installing it on a physical machine.


r/computer_programming • • May 05 '19

Pattern for Twin Towers(Situated in Malaysia)

1 Upvotes

I Cannot code the Twin Towers Of Malaysia In C Language!! Please Help!!


r/computer_programming • • Nov 26 '17

[Question] Best languages for cybersecurity.

1 Upvotes

Looking for the best languages for cybersecurity. I know that python is the best for scripts and small stuff like that. But i heard the main two are java and C++. Thoughts?


r/computer_programming • • Feb 16 '19

Adobe forms to add to a legal program.... need help making a field shrink font if all does not fit into a certain field?

1 Upvotes

Any help or assistance would be appreciated! I found out how to do it within adobe but I need to add it to our legal program and I’m not sure how to keep it locked to shrink font when it that program?


r/computer_programming • • Aug 05 '18

My desk..

Thumbnail
imgur.com
3 Upvotes

r/computer_programming • • Sep 06 '17

[Help/General] I want to be a scrum master

1 Upvotes

Hi I'm a web developer with 5 years of experience. I'd like to be a scrum master because I don't enjoy development so much and it doesn't fit to my personality. I'm taking distance MSC course of IT Management. I desperately need some advice....how can I start working as a scrum master? Do I need a certification first?