Computing desk | ||
---|---|---|
< February 14 | << Jan | February | Mar >> | February 16 > |
Welcome to the Wikipedia Computing Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
I've moved this question from the top of the page where it was originally posted by Chandra prashad mishra, into a separate section. Mitch Ames ( talk) 10:15, 15 February 2015 (UTC)
Moved to Science Desk Robert McClenon ( talk) 17:03, 15 February 2015 (UTC) |
---|
The following discussion has been closed. Please do not modify it. |
Europeans seem to have specimens in the whole Fischer–Saller scale (hair color) or the whole Martin–Schultz scale (eyes). In other regions, genetics seems to have favored black hair and eyes, invariably. But Europeans have any hair color that exists: red, blond, brown, black, and any eye color that exists.-- Noopolo ( talk) 16:46, 15 February 2015 (UTC) |
My girlfriend and I recently bought The Walking Dead Season 4 online. We watched the first two disks on our Xbox 360, as we watched all the previous seasons. But when we stuck the third disk in, it just started spinning really loud and fast, and didn't play. Likewise with the fourth and fifth disks. Her laptop does the same thing with those disks, but my laptop plays them just fine.
I've been looking this up online, and it looks like the problem most people have with playing DVDs is the region, but all the disks in the set would have the same region, wouldn't they? Why is it doing this? 50.245.232.211 ( talk) 19:29, 15 February 2015 (UTC)
I keep getting a null pointer exception error on one of the lines of my code and I'm not sure why. (Strings vex me!) Could someone explain why I'm getting this error?
public static void main(String[] args) {
String[] names;
names = new String10;
String name;
for (int count = 0; count <= 9; count++) {
System.out.print("Name:");
name = person.toString();
System.out.println("");
System.out.print("Grade:");
grade = number.nextDouble();
System.out.println("");
namescount = name;
}
}
The error is on the name = person.toString(); line. There's more to the program, it also takes in grades and prints out the two arrays, but I just kept it to what I think is relevant to the question. Thanks, Dismas| (talk) 19:30, 15 February 2015 (UTC)
class Program
{
public static void main(String[] args) {
String[] names;
names = new String10;
String name;
for (int count = 0; count <= 9; count++) {
Object person = new Object();
java.util.Random number = new java.util.Random();
System.out.print("Name:");
name = person.toString();
System.out.println("");
System.out.print("Grade:");
double grade = number.nextDouble();
System.out.println(grade);
namescount = name;
}
}
}
/*
* Ian Schulze
* 14 February 2015
* Assignment 5
* CIS-2271
*
* For each student in a class, the instructor will enter a numeric grade between
* 0 and 100 and a program will determine the corresponding letter grade.
* 90-100: A
* 80-89.99: B
* 70-79.99: C
* 60-69.99: D
* Below 60: F
*/
import java.util.Scanner;
public class App {
private static Scanner person;
private static Scanner number;
public static void main(String[] args) {
String[] names;
String[] grades;
names = new String10;
grades = new String10;
String name;
double grade;
String letterGrade;
System.out.println("There are 10 students in class.");
System.out.println("Please enter each student's name and numerical grade.");
for (int count = 0; count <= 9; count++) {
System.out.print("Name:");
name = person.toString();
System.out.println("");
System.out.print("Grade:");
grade = number.nextDouble();
System.out.println("");
namescount = name;
letterGrade = ConvertToGrade.convertGrade(grade);
gradescount = letterGrade;
}
for (int count = 0; count <= 9; count++) {
System.out.println(namescount + " " + gradescount);
}
}
}
Here's the full code. Thanks, Dismas| (talk) 20:25, 15 February 2015 (UTC)
person
or number
. It looks as though you're missing a line (or two) after the second println
statement, where you get the input from the user and create the Scanner
objects. If the intention is to only have one input which contains both the name and grade, you only need one Scanner
object, on which you can use the .next
method to get the name and the .nextInt
method to get the grade. See
the official documentation.
Tevildo (
talk)
21:17, 15 February 2015 (UTC)Thank you both for your help. I ran into more errors at runtime but I'll take a look at them later when I have more time. Dismas| (talk) 13:54, 16 February 2015 (UTC)
Computing desk | ||
---|---|---|
< February 14 | << Jan | February | Mar >> | February 16 > |
Welcome to the Wikipedia Computing Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
I've moved this question from the top of the page where it was originally posted by Chandra prashad mishra, into a separate section. Mitch Ames ( talk) 10:15, 15 February 2015 (UTC)
Moved to Science Desk Robert McClenon ( talk) 17:03, 15 February 2015 (UTC) |
---|
The following discussion has been closed. Please do not modify it. |
Europeans seem to have specimens in the whole Fischer–Saller scale (hair color) or the whole Martin–Schultz scale (eyes). In other regions, genetics seems to have favored black hair and eyes, invariably. But Europeans have any hair color that exists: red, blond, brown, black, and any eye color that exists.-- Noopolo ( talk) 16:46, 15 February 2015 (UTC) |
My girlfriend and I recently bought The Walking Dead Season 4 online. We watched the first two disks on our Xbox 360, as we watched all the previous seasons. But when we stuck the third disk in, it just started spinning really loud and fast, and didn't play. Likewise with the fourth and fifth disks. Her laptop does the same thing with those disks, but my laptop plays them just fine.
I've been looking this up online, and it looks like the problem most people have with playing DVDs is the region, but all the disks in the set would have the same region, wouldn't they? Why is it doing this? 50.245.232.211 ( talk) 19:29, 15 February 2015 (UTC)
I keep getting a null pointer exception error on one of the lines of my code and I'm not sure why. (Strings vex me!) Could someone explain why I'm getting this error?
public static void main(String[] args) {
String[] names;
names = new String10;
String name;
for (int count = 0; count <= 9; count++) {
System.out.print("Name:");
name = person.toString();
System.out.println("");
System.out.print("Grade:");
grade = number.nextDouble();
System.out.println("");
namescount = name;
}
}
The error is on the name = person.toString(); line. There's more to the program, it also takes in grades and prints out the two arrays, but I just kept it to what I think is relevant to the question. Thanks, Dismas| (talk) 19:30, 15 February 2015 (UTC)
class Program
{
public static void main(String[] args) {
String[] names;
names = new String10;
String name;
for (int count = 0; count <= 9; count++) {
Object person = new Object();
java.util.Random number = new java.util.Random();
System.out.print("Name:");
name = person.toString();
System.out.println("");
System.out.print("Grade:");
double grade = number.nextDouble();
System.out.println(grade);
namescount = name;
}
}
}
/*
* Ian Schulze
* 14 February 2015
* Assignment 5
* CIS-2271
*
* For each student in a class, the instructor will enter a numeric grade between
* 0 and 100 and a program will determine the corresponding letter grade.
* 90-100: A
* 80-89.99: B
* 70-79.99: C
* 60-69.99: D
* Below 60: F
*/
import java.util.Scanner;
public class App {
private static Scanner person;
private static Scanner number;
public static void main(String[] args) {
String[] names;
String[] grades;
names = new String10;
grades = new String10;
String name;
double grade;
String letterGrade;
System.out.println("There are 10 students in class.");
System.out.println("Please enter each student's name and numerical grade.");
for (int count = 0; count <= 9; count++) {
System.out.print("Name:");
name = person.toString();
System.out.println("");
System.out.print("Grade:");
grade = number.nextDouble();
System.out.println("");
namescount = name;
letterGrade = ConvertToGrade.convertGrade(grade);
gradescount = letterGrade;
}
for (int count = 0; count <= 9; count++) {
System.out.println(namescount + " " + gradescount);
}
}
}
Here's the full code. Thanks, Dismas| (talk) 20:25, 15 February 2015 (UTC)
person
or number
. It looks as though you're missing a line (or two) after the second println
statement, where you get the input from the user and create the Scanner
objects. If the intention is to only have one input which contains both the name and grade, you only need one Scanner
object, on which you can use the .next
method to get the name and the .nextInt
method to get the grade. See
the official documentation.
Tevildo (
talk)
21:17, 15 February 2015 (UTC)Thank you both for your help. I ran into more errors at runtime but I'll take a look at them later when I have more time. Dismas| (talk) 13:54, 16 February 2015 (UTC)