我试图在控制台中打印多行(如下所示),但我无法打印它。
<!DOCTYPE html>
<html lang="en-US">
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>
<body>
<div ng-app="">
<p>Name : <input type="text" ng-model="name"></p>
<h1>Hello '{{name}}'</h1>enter code here
</div>
</body>
</html>
我解决了
public class MultipleStringPrint {
public static void main(String[] args) {
String str = "<!DOCTYPE html> \n <html lang=\"en-US\"> \n "
+ "\"<script src=\"http:\\/\\/ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js\"><\\/script> \n "
+ "<body> \n <div ng-app=\"\">\n "
+ "<p>Name : <input type=\"text\" ng-model=\"name\"></p>\n \t "
+ "<h1>Hello '{{name}}'</h1>\n "
+ "\t <\\/div>\n "
+ "<\\/body>\n "
+ "<\\/html>\n";
System.out.println(str);
}
|
我是一名优秀的程序员,十分优秀!