getValue(String.class)vs getValue().toString(); [英] getValue(String.class) vs getValue().toString();

查看:46
本文介绍了getValue(String.class)vs getValue().toString();的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在FireBaseDp中,在检索数据时,可以使用上述方法之一来获取价值.我想知道到底有什么区别(两者之间有什么优点/缺点)?

In FireBaseDp while retrieving data one can use one of the above methods to get value. I am wondering just what is the difference (any advantages /disadvantages with one or the other)?

推荐答案

确切的行为取决于您提取的数据类型.

The exact behavior depends on the type of data that you're extracting.

如果要提取String值,则两个代码段的行为是相同的.

If you're extracting a String value, the behavior of the two snippets is the same.

这篇关于getValue(String.class)vs getValue().toString();的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆