Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

new Integer question ...

Posted on 2006-07-10
3
Medium Priority
?
194 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 1200 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

Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
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.
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Suggested Courses

609 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