For Loop public static void main(String[] args){ int n = 3; String result = "“; for(int i = 1; i<=n; i++){ System.out.print(i+" "); } System.out.println(); }