---
title: "java注释中书写html标记"
author: "maimode"
date: "2012-02-07T15:31:38Z"
tags: []
categories: ["编程语言"]
slug: "java-html"
draft: false
lastmod: "2012-02-07T15:31:38Z"
id: 1396610
url: "https://maimode.iteye.com/blog/1396610"
---

有时候我们需要在注释中写html标记或者xml节点标记，但是直接在注释中的话，查看时我们的&lt;xxx&gt;标签会被过滤掉，如下，假设我们要在注释中写

```
<height>185</height>
```

 如果直接这样写的话，查看时将只有height，要想达到预期的目的，需要这样写：&lt;height&gt;185&lt;/height&gt;

 

即：将 &lt; 替换为 &lt; 即可