发布网友 发布时间:2022-04-22 08:56
共1个回答
热心网友 时间:2023-07-10 15:24
# -*- coding: utf-8 -*-
from java.util import ArrayList
#Java ArrayList 转 Python list
def CovertJlistToPlist(jList):
ret = []
if jList is None:
return ret
for i in range(jList.size()):
ret.append(str(jList.get(i)))
return ret
#Python list 转 Java ArrayList
def CovertPlistTOJlist(pList):
ret = ArrayList()
for i in range(len(pList)):
ret.add(i)
return ret
如果解决了您的问题请采纳!