Solved

Need help with this problem

Posted on 2011-02-16
2
363 Views
Last Modified: 2013-11-23
public void print(String filename, boolean doubleSided)
    {
        System.out.println(filename);
        if(doubleSided = true){
            System.out.println(2);
        }
        else if(doubleSided = false)
        {
                System.out.println("Error. The paper must be double sided");
        }        
               
    }
0
Comment
Question by:ryanbecker24
  • 2
2 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 500 total points
Comment Utility
Should be

 if(doubleSided == true)

etc
0
 
LVL 86

Expert Comment

by:CEHJ
Comment Utility
:)
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now