What is the new syntax of XX ≠ null in Java?

, Tangcheng 2021-09-15 05:40:54
new syntax xx null java


The following article comes from official account :Java Technology stack , Author stack leader

Strange doesn't mean (≠)

lately , Stack manager IntelliJ IDEA Looking at the source code, I found that :

 picture

Why ~ What the hell is this ?

Java Not always  !=  Well ? When can I write    了 ??

It's not scientific ~

I thought I was presbyopia , I've read it several times , I think it should be IDEA It's a special effect , Then go to the symbol , The discovery can't restore the original ...

And then I surfed the Internet , I finally found the switch :

Preferences >  Editor > Reader Mode > Font ligatures

 picture

Reader Mode:  Editor settings for read only mode .

Font ligatures: ligatures yes " rope “、” bandage " It means ,Font ligatures No, it can be understood as " Font bandage " Well , therefore  !=  Is shown as    No wonder .

When the switch is off , Let's look at the source code above :

 picture

It's finally back to normal , That's what makes it comfortable ..

Ligatures Expand

In other words, in the source code can be  !=  Is shown as  , It should also be able to be displayed in normal code editor ?

you 're right !!

Stack length in the setup menu according to "ligatures" Search for , I found several settings Font ligatures The place of :

 picture

Then turn on this option :

Preferences > Editor > Font > Enable font ligatures

The stack leader casually wrote some code and tested it :

 picture

A normal code editor can also display !

As you can see from the test code above , I added a >=, So it's not just that it doesn't mean , More symbols can be seen by switching this switch .

Close the switch , Native display :

 picture

Turn on the switch , Instead of displaying :

 picture

I'll copy the test code now :

public class Test {
    public static void main(String[] args) {
        int n = 1;
        if (n != 0) {
            System.out.println(1);
        }
        if (n >= 1) {
            System.out.println(2);
        }
    }
}

You can see , Display to display , The code is copied with normal syntax .

summary

Okay , Today, the stack leader shared with you IDEA This Font Ligatures switch , I don't know. IDEA In which version did you make this default switch , It's really painful ..

This feeling is just like IDEA Intelligent display in the same way :

 picture

As shown above , because Java 7 The above generic types can be inferred automatically , If the collection interface comes with generics , The collection implementation comes with generics , Then the generics implemented by the collection will be folded into ~ Show , Put the mouse on it or click it to display the native code , It also reminds you that generics in collection implementations are redundant .

But very speechless , It's not equal to a symbol, but it can't be clicked / Floating display of native symbols , Need a hard switch .

All in all , I don't think the existence of this thing is of any use at all , It's not very recommended , In the end, I silently put all the Font Ligatures The switches are off , Otherwise, it will confuse the public .

Of course , Every man has his hobbyhorse , Some people like this way of display, that is the law of true fragrance .

IDEA Fragrance is fragrance , You might say that there is a charge for using it , In fact, it also has an open source community version , Charging professional version is also easy to apply for the activation code ,

Last , If this article helps you , Click on it to encourage you ! Also welcome to share and forward to more friends in need ~

What else have you met IDEA Strange questions ? Welcome to share ~

--- EOF ---

版权声明
本文为[, Tangcheng]所创,转载请带上原文链接,感谢
https://javamana.com/2021/09/20210909120408076g.html

  1. 互聯網Java工程師面試題,遇到的面試官都是架構師級別,
  2. 从入门到精通系列Java高级工程师路线介绍,拼多多三面惨败,
  3. 今年最新整理的《高频Java面试题集合》,2021Java通用流行框架大全,
  4. La dernière collection de questions d'entrevue Java haute fréquence organisée cette année, 2021 Java Universal Popular Framework
  5. De l'introduction à l'introduction de l'itinéraire de l'ingénieur principal Java de la série Mastering, il y a eu de nombreux échecs.
  6. JavaScript operator (1), Web Development Engineer
  7. Java simultané Programming Books recommended, half - Runner Java Program see me easy to Attack!
  8. Trier les questions d'entrevue Javascript, trier les points de connaissance des itinéraires d'apprentissage
  9. Xiaopeng P7, a high-value domestic electric car that can't be missed
  10. Song Mengjun's "sleepless night" triggered an upsurge of dance storm after 00
  11. Encapsulated PHP sends HTTP requests with curl. Get and post are very easy to use
  12. Recommend a lightweight and practical excellent Linux panel - wgcloud
  13. 从思维图到基础再到深入,记一次字节跳动Java研发岗的面试经历,
  14. 从底层开始带你了解并发编程,五步搞定Java开发环境部署,
  15. 从基础到源码统统帮你搞定,一招彻底帮你搞定HashMap源码,
  16. 從基礎到源碼統統幫你搞定,一招徹底幫你搞定HashMap源碼,
  17. De la base au code source pour vous aider à résoudre tout, un tour pour vous aider à résoudre complètement le code source hashtap,
  18. Commencez par le bas pour vous familiariser avec la programmation simultanée, et terminez le déploiement de l'environnement de développement Java en cinq étapes.
  19. De la carte de pensée à la base et à l'approfondissement, prenez note de l'expérience d'entrevue d'un octet sautant le poste de recherche et développement Java.
  20. Open source: Suzhou tourism strategy based on pyecharts visual analysis
  21. Good play | every character hates it. How does jade building spring do it?
  22. 從底層開始帶你了解並發編程,五步搞定Java開發環境部署,
  23. 以商品超卖为例讲解Redis分布式锁,一招彻底帮你搞定HashMap源码,
  24. 从青铜到王者的路线,2021Java者未来的出路在哪里?
  25. JavaScript Advanced Programming (3rd Edition) Reading note 6
  26. 從青銅到王者的路線,2021Java者未來的出路在哪裏?
  27. Quelle est la voie à suivre pour les 2021 Java du bronze au roi?
  28. Prenez l'exemple de la surproduction de marchandises pour expliquer redis Distributed Lock, un tour complet pour vous aider à résoudre le code source de hashtap,
  29. 以商品超賣為例講解Redis分布式鎖,一招徹底幫你搞定HashMap源碼,
  30. Win10系统 java环境配置
  31. Non-ASCII character ‘\xe5‘ in file kf1.py on line 4, but no encoding declared; see http://python.or
  32. 手把手教你搭建微信小程序服务器(HTTPS)
  33. JavaScript Review sketch - 1
  34. sqli-labs-less-18 http头user agent+报错注入
  35. Git下载、安装、配置、配合Intellij Idea实现代码版本控制
  36. NHibernate inheritance
  37. Summary of basic knowledge points of JavaScript language (mind map)
  38. GIT télécharge, installe, configure et implémente le contrôle de version de code avec intellij idea
  39. Sqli Labs - less - 18 http header user agent + Error Reporting Injection
  40. Vous apprendrez à construire un serveur d'applet Wechat (https) à la main
  41. Non - ASCII character 'xe5' in file kf1.py on Line 4, but no Encoding declared;Voirhttp://python.or
  42. 作为一名程序员我不忘初心,Java最新实习面试经验总结,
  43. 作为一名Java面试者你应该知道的,2021最新Java常用开源库总结,
  44. 作为一个程序员,你觉得最大的悲哀是什么,2021年大厂Java岗面试必问,
  45. Configuration de l'environnement Java du système win10
  46. 作為一個程序員,你覺得最大的悲哀是什麼,2021年大廠Java崗面試必問,
  47. En tant que programmeur, quelle est la plus grande tristesse que vous ressentez? L'entrevue d'emploi Java de 2021 dans une grande usine vous demandera:
  48. Comme vous devriez le savoir en tant qu'intervieweur Java, 2021 dernier résumé des bibliothèques open source couramment utilisées pour Java,
  49. En tant que programmeur, je n'oublie pas le dernier résumé de mon expérience d'entrevue de stage en Java.
  50. 作為一名Java面試者你應該知道的,2021最新Java常用開源庫總結,
  51. New feature of Java 8. Stream (). Map (general programming method: collect. Groupingby)
  52. Computer graduation project java + SSM hospital registration system
  53. 作為一名程序員我不忘初心,Java最新實習面試經驗總結,
  54. 使用Docker部署Spring-Boot项目,论程序员成长的正确姿势,
  55. Conseils pour améliorer l'efficacité du Code Java mille fois
  56. 全网首发,我在华为做Java外包的真实经历!
  57. 全套Java视频百度云,终于找到一个看得懂的JVM内存模型了,
  58. Docker tutorial series (I) introduction to docker tutorial spring cloud mybatis distributed microservice Cloud Architecture
  59. 全網首發,我在華為做Java外包的真實經曆!
  60. Run around with money? Li Weijia fell into the storm of endorsement! In the face of collective hot discussion, personal attitude has become the focus of attention