Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of finding the intersection in oracle and java

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

And ((# {protocolStartTime} > = t.protocol_start_time AND # {protocolStartTime} = t.protocol_start_time AND # {protocolEndTime})

This determines that the start time and end time you pass in are compared with the start time and end time in the library to find out the time overlap, of course, this check contains your sentence this article, you can find more than one.

In java, you can use retainAll to find the intersection

Public static void main (String [] args) {

List list1 = new ArrayList ()

List list2 = new ArrayList ()

List1.add ("2")

List1.add ("s")

List1.add ("2")

List1.add ("f")

List2.add ("g")

List2.add ("c")

List2.add ("2")

List2.add ("a")

List1.retainAll (list2)

System.out.println (list1.size ())

System.out.println (list1.retainAll (list2))

}

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report