java


Java Error: Input cannot be resolved


I am new to Java. Please bear with me. I am trying a simple program. The number of dogs equal a certain amount of points. 4 or more dogs equal 60 points.
import java.util.Scanner;
public class Welcome {
public static void main(String[] args){
int dogs,points;
Scanner scan = new Scanner(System.in);
System.out.println("Enter the number of dogs: ");
int dogs = input.nextInt();
switch (dogs)
{
case 0:
System.out.println("You've earned 0 points!");
case 1:
System.out.println("You've earned 5 points!");
break;
case 2:
System.out.println("You've earned 15 points!");
break;
default: System.out.println("You've earned 60 points!");
}
}
}
Any help will be appreciated.
import java.util.Scanner;
public class Welcome {
public static void main(String[] args) {
int dogs;
Scanner scan = new Scanner(System.in);
System.out.println("Enter the number of dogs: ");
dogs = scan.nextInt();
switch (dogs) {
case 0:
System.out.println("You've earned 0 points!");
break;
case 1:
System.out.println("You've earned 5 points!");
break;
case 2:
System.out.println("You've earned 15 points!");
break;
case 3:
System.out.println("You've earned 30 points!");
break;
case 4:
System.out.println("You've earned 60 points!");
break;
default:
System.out.println("You've earned 60 points!");
}
}
}

Related Links

Is there any Connect SDK version or alternative for Linux?
How to import test doubles from test directory in jsp ( using intellij idea)
How can I show this Toast message only if I click the second Tab?
Can you explain the thread profile graph?
Exception in thread “main” org.hibernate.HibernateException:
Android VideoView fullscreen keep aspect ratio center
Not Able to Generate Java Skeleton from WSDL
Method Call Activity cannot call (Exception while evaluating method-call activity EL expression)
Cast Execption with custom GlSurfaceView
Vertx test on context issues deploying verticle
How to list / extract all the recurring events from the ics file from RRULE in Android?
remove a column from a dataframe spark
Selenium can't send keys in found element
Why I can't use Dynamic shortcuts in my app? I got a IllegalStateException: Launcher activity not found for package
Jedis related: how could the sub thread in the main thread had stoped?
Automatically Update Access Token

Categories

HOME
maven
keycloak
keras
mfc
homebrew
hashmap
react-router
webstorm
jsp-tags
yarn
v8
win32gui
blueprintjs
enterprise-library-5
django-imagekit
basic
vifm
volttron
floating-action-button
quickbooks
windows-azure-storage
messages
percona
reactive-cocoa
nhibernate-envers
jquery-ajaxq
errorlevel
lcd
traffic
fgetcsv
linkerd
web-api-testing
typo3-6.2.x
ping
ejabberd-module
subdomains
librato
ioio
create-table
gtrendsr
typed.js
accelerate-framework
android-nestedscrollview
google-api-nodejs-client
normal-distribution
android-ble
revolution-slider
qwerty
hockeyapp
service-discovery
uft-api
unoconv
unixodbc
flashair
s
revapi
pango
boost-multi-index
veracode
dtexec
sqlbulkcopy
flow-control
blacklist
elements
azure-virtual-network
multi-level
jwplayer7
nsviewcontroller
prettytensor
python-stackless
lib.web.mvc
intellij-14
cakephp-3.1
mono-embedding
apache-commons-fileupload
processmodel
sortedlist
e10s
truevault
directoryservices
gwidgets
oxwall
codeigniter-url
winddk
fpml
applescript-objc
php-5.4
castle
heisenbug
fluentautomation
message-driven-bean
mcts
uv-mapping
page-layout
ivyde
sqlperformance
typoscript2
visitor-statistic
avatar
simpletest
pascal-fc
putchar
3gp

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App