troubleshooting Question

Java boolean

Avatar of professorchaos14
professorchaos14 asked on
Programming Languages-OtherJava
5 Comments1 Solution667 ViewsLast Modified:
I'm trying to figure out how do create a boolean that checks to see if a double is above 0 and a string contains at least one character, if not I have to return a false value. My issue at the moment is displaying whether the string has characters or not.

So far I have:

	public boolean addPartDetails(String partDescription, double partCost) 	//incomplete
	{
		boolean description = false;
		boolean wrongPrice = false;
		
		if (partCost <= 0)
		{
			wrongPrice = true;
		}
		
		if (partDescription )
		{
			
		}
	}
ASKER CERTIFIED SOLUTION
zzynx
Sr. Software engineer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros