Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/68.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 为什么我的代码会跳过用户输入当前/目标行业的部分?_Java - Fatal编程技术网

Java 为什么我的代码会跳过用户输入当前/目标行业的部分?

Java 为什么我的代码会跳过用户输入当前/目标行业的部分?,java,Java,我的代码: import java.util.*; public class ScreenCandidates { public static void main (String[] args) { Scanner scan = new Scanner(System.in); //About You System.out.println("\t\tAbout You"); System.out.println(); System.out.print("\nName: "); String

我的代码:

import java.util.*;

public class ScreenCandidates
{

public static void main (String[] args)
{
Scanner scan = new Scanner(System.in);

//About You
System.out.println("\t\tAbout You");
System.out.println();
System.out.print("\nName: ");
String name = scan.nextLine();
System.out.print("\nLocation: ");
String location = scan.nextLine();
System.out.print("\nLanguages: ");
String languages = scan.nextLine();
System.out.print("\nHighest Level of Education: ");
String education = scan.nextLine();
System.out.print("\nGPA: ");
double gpa = scan.nextDouble();
//Your Professional Goals
System.out.println("\t\tYour Professional Goals ");
System.out.print("\nIndustry (current or target): ");
String industry = scan.nextLine();
//Work History
System.out.println("\t\tWork History ");
System.out.println();
System.out.print("\nCurrent Title: ");
String currentTitle = scan.nextLine();
System.out.print("\nCurrent Employer: ");
String currentEmployer = scan.nextLine();
System.out.print("\nPrevious Titles: ");
String previosTitle1 = scan.nextLine();
System.out.print("\nFormer Employer: ");
String formerEmployer = scan.nextLine();
//Qualifications, Skills and Accomplishments
}
}
当我运行代码时:

关于你

姓名:彼得

地点:07430

语言:德语

最高学历:大专学历

平均成绩:3.95 你的职业目标

行业(当前或目标):工作经历

当前标题:Java程序员

现任雇主:Verizon

历届职称:教师

前雇主:Jonas Salk中学

双gpa=scan.nextDouble()之后添加一个
scan.nextLine()
通过调用
nextDouble()