Hello guys again!
I just want to know if is possible to compile code skiping part of that code in eclipse.
Example (I dont want eclipse to compile what is after ***):
//By Mike Liberato, 2013. import java.util.Scanner; import java.text.NumberFormat; public class CalculateSalePrice { public static void main(String[] args) { double iprice, poff, sprice, asaved; Scanner scan = new Scanner (System.in); NumberFormat fmt = NumberFormat.getCurrencyInstance(); System.out.print("Enter item price: "); iprice = scan.nextDouble(); System.out.print ("Percent off: "); poff = scan.nextDouble(); asaved = (double) (iprice*poff/100); sprice = (double) (iprice-asaved); System.out.println ("Sale price: " + fmt.format(sprice)); System.out.print("Amount saved: " + fmt.format(asaved)); ***asaved = (double) (iprice*poff/100); ***sprice = (double) (iprice-asaved); ***System.out.println ("Sale price: " + fmt.format(sprice)); ***System.out.print("Amount saved: " + fmt.format(asaved)); } }
So if I de-compile my code those lines are not going to be in the compiled file, but the code is istill going to be in my project...
Hope, that you guys understand. Thanks.