hi in this video we're going to talk
about printing in Java so a traditional
first program that people always write
is called hello world where you output
hello world to the screen and so the way
that we do that in Java is with this
command system dot out dot print line
the way you write it is capital S and
system dot out dot print line open
parenthesis and then in quotes hello
world and then close parenthesis
semicolon if we want to pronounce
something else like woohoo
then we write woohoo in between the
quotation marks and so when we're going
to write these programs instead of
extending Karel we're now gonna extend
something called console program so
we're gonna go over into our editor and
write our first program hello world okay
so let's write this hello world program
from start to finish so public class
hello world extends console program and
that's because we want to print out to
the console so now just like Karel we
start with public void run Oh
parentheses close parentheses enter open
curly bracket enter and now we want to
print out hello world so we type system
dot out dot print line open parenthesis
and then in quotes hello world and
quotes and then a semicolon at the end
of the line let's click run and there we
have it that's hello world we've written
hello world to the screen and if we
wanted to write something else then we
add another line we go system that out
print line something else so now we can
run that and you'll see now we'll print
out hello world and something else so
that's how you use system dot out dot
print line to print to the screen now
you can try that out