Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 196
  • Last Modified:

new Integer question ...

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
meow00
Asked:
meow00
  • 2
1 Solution
 
objectsCommented:
do you mean to assign a? if so, I don't think so

        Integer IntA = new Integer((b<c) ? b: c);
0
 
objectsCommented:
or:

        Integer IntA = new Integer(Math.min(b, c));
0
 
ksivananthCommented:
or this

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

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now