亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

為什么這個html頁面的完整內容沒有顯示

為什么這個html頁面的完整內容沒有顯示

桃花長相依 2023-11-13 10:37:57
我編寫此代碼只是為了顯示“pre”標記內寫入的內容并將其保存為 abc.html    <pre>        public class ReverseArr {            public static void main(String[] args) {                Scanner scanner = new Scanner(System.in);                System.out.println("Enter the size of array : ");                int n = scanner.nextInt();                //Declaring the array                int arr[] = new int[n];                System.out.println("Enter the array elements : ");                for(int i=0;i<n;i++) {                    arr[i] = scanner.nextInt();                }                System.out.println("The Entered elements are : ");                for(int i=0;i<n;i++) {                    System.out.print(arr[i] + " ");                }                System.out.println();                System.out.println("The reverse of array is : ");                for(int i=n-1;i>=0;i--) {                    System.out.print(arr[i] + " ");                }            }        }      </pre>我在 Chrome 和 Firefox 中運行它,但我得到的輸出為:    public class ReverseArr {        public static void main(String[] args) {            Scanner scanner = new Scanner(System.in);            System.out.println("Enter the size of array : ");            int n = scanner.nextInt();            //Declaring the array            int arr[] = new int[n];            System.out.println("Enter the array elements : ");/*After that problem occurs*/            for(int i=0;i=0;i--) {                System.out.print(arr[i] + " ");            }        }    }為什么瀏覽器(Chrome、Firefox)中不顯示完整內容?需要進行哪些更改才能在瀏覽器中顯示“pre”標簽內寫入的完整內容?
查看完整描述

1 回答

?
慕的地8271018

TA貢獻1796條經驗 獲得超4個贊

正如評論中所指出的,問題在于代碼中的尖括號 (<>) 弄亂了 HTML 布局。

只需<逐一替換就可以了。&lt;>&gt;


查看完整回答
反對 回復 2023-11-13
  • 1 回答
  • 0 關注
  • 129 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號