Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assume a properly formatted program-What prints when the following code is run? boolean night = false; boolean cloudy = false; if (!night || !cloudy) {

image text in transcribedimage text in transcribedimage text in transcribed

Assume a properly formatted program-What prints when the following code is run? boolean night = false; boolean cloudy = false; if (!night || !cloudy) { System.out.println("You are safe from vampires"); } You are safe from vampires Nothing Prints You are not safe from vampires Question 13 1 pts Assume a properly formatted program- What prints when the following code is run and if the value stored in attempts is 3. int time = 5; if (attempts == 3 && time > 4) { System.out.println("Your account is locked"); } Your account is not locked o Nothing Prints Your account is locked Assume a properly formatted program- What prints when the following code is run and the user enters 72? Scanner keyboard = new Scanner(System.in); System.out.println("Enter your height"); int height = keyboard.nextInt(); if (height >= 62 && height 5) { System.out.println("Hi Fred welcome back"); } You are not fred Hi Fred welcome back Nothing Prints Question 17 1 pts Assume a properly formatted program- What prints if the users enter Fred when the following code is run? Scanner keyboard = new Scanner(System.in); System.out.println("Enter You Name"); String name = keyboard.nextLine(); int time = 6; if (name.equals("Fred") || time > 5) { System.out.println("Hi Fred welcome back"); } You are not fred Nothing Prints Hi Fred welcome back

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions