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

Google push notifications java handler
Need help in attempt to animate gif inside TextView
ActionListener JTextField Java
Cannot find image in table in Selenium
SunCertPathBuilderException => Maven JAXB2 generation with certificate
How to Create JavaFX 16 bit Greyscale Images
ArtifactTransferException: Failure to transfer org.springframework.data:spring-data-jpa:jar:1.7.0.RELEASE
Run mvn install on a cloned repo using chef
Inheritance in hibernates where parent class variable is only used by few child classes
Transform a list of maps to a map that uses ImmutablePair with Java 8 streams
Issue with Maven in installing the Software
Apache POI - Add image to comment
Error creating bean with name 'transactionManager' in spring 3.2.3.RELEASE+ Hibernate 4.1.9.Final + Dynamic web module 2.4
Tree structure JSON generation in Java
MD5 Binary String conversion to Byte Array
Time complexity of this code using Java 8 stream and predicate

Categories

HOME
client
image
plot
adb
leon
v8
webpack-2
directx
gnupg
kentor-authservices
row
export-to-csv
zend-framework3
php-7.1
jplayer
hapi
carthage
iolanguage
lombok
dosgi
ghc
interop
excel-vba-mac
scichart
dbext
swingx
jndi
icloud-api
crystal-reports-2010
social-media
ejabberd-module
compatibility
quote
uisplitview
textmate
environment-modules
vxworks
dynamics-crm-2013
twitch
hue
segment
galleria
google-datalayer
revapi
rails-routing
python-webbrowser
blogengine.net
statsd
webdriverjs
pycaffe
wdf
angular-cache
removechild
paypal-express
packagist
dlna
prerequisites
citrus-pay
computer-algebra-systems
sankey-diagram
vstest.console.exe
remobjects
fscommand
clicktag
xc16
titanium-modules
internet-connection
google-reader
comexception
algebraic-data-types
industrial
mysqltuner
easy-install
padarn
sqlperformance
type-equivalence
selected
hamiltonian-cycle
ohm
nsobject
genshi
infobox
recent-documents
sql-server-profiler
html-input
gamma
thunderbird-lightning
substrings
uimenucontroller
simpletest
premature-optimization
sector
ugc
django-notification
rtml

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