First Code, But I Feel It Is So Ugly, Can You Explain Why? Question:- Why is this code so ugly ??
This is my first code, it is working fine, but I feel it doesn't looks as standard code … I am still studying java through youtube, as I have just completed two topics language fundamentals and operators and assignments in java.
I have tried to create code that calculates loan on particular date and at particular rate of interest, it takes user inputs.  Please Run This Code At Your IDE.
I have created this code by just knowing two topics or say first two chapters of basic java.

package learningJava;
import java.util.Scanner;

public class Test
{

    public static void main(String[] args) 


     {
     Scanner sc = new Scanner (System.in);

    System.out.println(&quot;if Days is not calculated just type 0&quot;);
 
    System.out.print(&quot;Days: &quot;);

    double day = sc.nextDouble();


    if (day&lt;=0)
    {
    System.out.println(&quot;Old Year: &quot;);

    double oldyear = sc.nextDouble();

    System.out.println(&quot;Old Month: &quot;);

    double oldmonth = sc.nextDouble();

    System.out.println(&quot;Old Date: &quot;);

    double olddate = sc.nextDouble();

    System.out.println(&quot;New Year: &quot;);

    double newyear = sc.nextDouble();

    System.out.println(&quot;New Month: &quot;);

    double newmonth = sc.nextDouble();

    System.out.println(&quot;New Date: &quot;);

    double newdate = sc.nextDouble();



     day = ((newyear*365)+(newmonth*30)+(newdate))-(((oldyear*365)+(oldmonth*30)+(olddate)));

     System.out.println(&quot;Days = &quot;+day);

     System.out.print(&quot;Principle: &quot;);

     double principle = sc.nextDouble();
 
     System.out.print(&quot;Rate Of Interest: &quot;);

     double rateofinterest = sc.nextDouble();

     double interest = (((principle*(rateofinterest/100))/30)*day);

     System.out.println(&quot;--------------------------------&quot;);

     System.out.println(&quot;Interest = Rs &quot; +interest);

     System.out.println(&quot;                                 &quot;);

     System.out.println(&quot;Total Amount = Rs &quot; +(principle+interest));

     System.out.println(&quot;--------------------------------&quot;);

     System.out.println(&quot;Thankyou!!&quot;);

    }

else 
    {
    
     System.out.print(&quot;Principle: &quot;);
     
     double principle = sc.nextDouble();

     System.out.print(&quot;Rate Of Interest: &quot;);

     double rateofinterest = sc.nextDouble();  

     double interest = (((principle*(rateofinterest/100))/30)*day);

     System.out.println(&quot;--------------------------------&quot;);

     System.out.println(&quot;Interest = Rs &quot; +interest);

     System.out.println(&quot;                                 &quot;);

     System.out.println(&quot;Total Amount = Rs &quot; +(principle+interest));

     System.out.println(&quot;--------------------------------&quot;);

     System.out.println(&quot;Thankyou!!&quot;);

     }

}

}
it is a bit hard to compare it with "standard code" if you only worked through first two chapters ;)

You should consider three principles in the following order:


The code should work
The code should be readable
The code should be extendable


Only the 1st is proofable. But maybe not that easy as one might think. Consider edge cases and errors. It takes some experience to know them. But usually something like 


Boundary values - e.g. 0 for a lower boundary
Wrong format of parameter e.g. 0,5 instead of 0.5 (for english local)
Input is out of allowed boundary


There are a lot of ways to handle them, like to ask for a new value or to simply abort.

If your code is readable is matter of taste. I prefer short code blocks in methods that are named. Also repeated code should be avoided. 
That said here is my first concrete suggestion for you: There are common code blocks where you ask the user for a value (System.out.print(...)) and then read the value (sc.nextDouble()). You could combine them to a method, like

private static double askForDouble(String label, Scanner scanner){
    System.out.print(label);
    return scanner.nextDouble();
}


which you can use then instead of every occurance:

System.out.print("Days: ");
double day = sc.nextDouble();


becomes

double day = askForDouble("Days: ", sc);


I would also put every calculation in separate functions although that would not give any benefit at the moment. But later you could write unit tests.

There are more possible improvements, but you should go on with the tutorials to learn about them.