Shout out to our very own Tosha Shah for representing Texas and NIC at the myAmerica Developer Summit hackathon hosted...
Posted by Texas.gov on Friday, April 17, 2015
Saturday, April 18, 2015
Tuesday, March 24, 2015
Salesforce Iwatch webinar
The Apple Watch is the long anticipated wearable device from Apple. It includes a striking design and innovative new interface. Developers can build apps, or specifically extensions to apps running on their iPhone, using WatchKit, Apple’s developer SDK. Now, with the latest Salesforce Wear Developer Pack developers can build apps for Apple Watch and Salesforce.com Join this webinar to learn how to build your first Apple Watch app using Salesforce Wear Kit.
What you will learn:
- How to use the Salesforce Wear Developer Pack to extend your iPhone apps to the Apple Watch
- Common implementation patterns for Apple Watch development, including: notifications, glances, messaging with the Salesforce Mobile SDK of iOS delegates, and more
- Storyboards and project targets for xCode and Apple Watch
- Writing Swift code to work with Salesforce data
Key Takeaways
- How to create an Apple Watch app in conjunction with the Salesforce Mobile SDK for iOS
- Sending and receiving data from Salesforce on the Apple Watch
Intended Audience
Existing Apple iOS developers, or Salesforce Platform developers interested in getting started with iOS Development
Wednesday, July 30, 2014
Java Questions
Does Java pass by reference or pass by value?
Q: If Java uses the pass-by reference, why won't a swap function work?
A: Java does manipulate objects by reference, and all object variables are references. However, Java doesn't pass method arguments by reference; it passes them by value.
Take the
badSwap() method for example:
public void badSwap(int var1, int var2) { int temp = var1; var1 = var2; var2 = temp; }When
badSwap() returns, the variables passed as arguments
will still hold their original values. The method will also fail if we
change the arguments type from int to Object, since Java passes object references by value as well. Now, here is where it gets tricky:
public void tricky(Point arg1, Point arg2) { arg1.x = 100; arg1.y = 100; Point temp = arg1; arg1 = arg2; arg2 = temp; } public static void main(String [] args) { Point pnt1 = new Point(0,0); Point pnt2 = new Point(0,0); System.out.println("X: " + pnt1.x + " Y: " +pnt1.y); System.out.println("X: " + pnt2.x + " Y: " +pnt2.y); System.out.println(" "); tricky(pnt1,pnt2); System.out.println("X: " + pnt1.x + " Y:" + pnt1.y); System.out.println("X: " + pnt2.x + " Y: " +pnt2.y); }If we execute this
main() method, we see the following output:
X: 0 Y: 0 X: 0 Y: 0 X: 100 Y: 100 X: 0 Y: 0The method successfully alters the value of
pnt1, even though it is passed by value; however, a swap of pnt1 and pnt2 fails! This is the major source of confusion. In the main() method, pnt1 and pnt2 are nothing more than object references. When you pass pnt1 and pnt2 to the tricky()
method, Java passes the references by value just like any other
parameter. This means the references passed to the method are actually copies
of the original references. Figure 1 below shows two references
pointing to the same object after Java passes an object to a method.
Subscribe to:
Posts (Atom)





