Solved

new Integer question ...

Posted on 2006-07-10
3
185 Views
Last Modified: 2010-03-31
Hi experts,

  Is there a way to fix the following line?

        Integer IntA = new Integer(int a = (b<c) ? b: c);

  Due to the technique difficulty, I am unable to make them to two lines ...

 thanks.
0
Comment
Question by:meow00
  • 2
3 Comments
 
LVL 92

Expert Comment

by:objects
ID: 17077953
do you mean to assign a? if so, I don't think so

        Integer IntA = new Integer((b<c) ? b: c);
0
 
LVL 92

Accepted Solution

by:
objects earned 300 total points
ID: 17077955
or:

        Integer IntA = new Integer(Math.min(b, c));
0
 
LVL 26

Expert Comment

by:ksivananth
ID: 17078071
or this

int a ;
Integer IntA = new Integer( ( a = b < c ? b : c ) ) ;
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

757 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

21 Experts available now in Live!

Get 1:1 Help Now