Skip to content

Commit 4bc9946

Browse files
committed
Fix array syntax in README
1 parent 517a99f commit 4bc9946

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -114,57 +114,57 @@ sendgrid.send(email);
114114
```java
115115
email.addTo("foo@example.com");
116116
// or
117-
email.addTo(["foo@other.com", "bar@other.com"]);
117+
email.addTo(new String[]{"foo@other.com", "bar@other.com"});
118118
// or
119119
email.addTo("foo.bar@other.com", "Foo Bar");
120120
```
121121

122122
#### setTo
123123

124124
```java
125-
email.setTo(["foo@other.com", "bar@other.com"]);
125+
email.setTo(new String[]{"foo@other.com", "bar@other.com"});
126126
```
127127

128128
#### addToName
129129

130130
```java
131131
email.addToName("Foo");
132132
// or
133-
email.addToName(["Foo", "Bar"]);
133+
email.addToName(new String[]{"Foo", "Bar"});
134134
```
135135

136136
#### setToName
137137

138138
```java
139-
email.setToName(["Foo", "Bar"]);
139+
email.setToName(new String[]{"Foo", "Bar"});
140140
```
141141

142142
#### addCc
143143

144144
```java
145145
email.addCc("foo@example.com");
146146
// or
147-
email.addCc(["foo@other.com", "bar@other.com"]);
147+
email.addCc(new String[]{"foo@other.com", "bar@other.com"});
148148
```
149149

150150
#### setCc
151151

152152
```java
153-
email.setCc(["foo@other.com", "bar@other.com"]);
153+
email.setCc(new String[]{"foo@other.com", "bar@other.com"});
154154
```
155155

156156
#### addBcc
157157

158158
```java
159159
email.addBcc("foo@example.com");
160160
// or
161-
email.addBcc(["foo@other.com", "bar@other.com"]);
161+
email.addBcc(new String[]{"foo@other.com", "bar@other.com"});
162162
```
163163

164164
#### setBcc
165165

166166
```java
167-
email.setBcc(["foo@other.com", "bar@other.com"]);
167+
email.setBcc(new String[]{"foo@other.com", "bar@other.com"});
168168
```
169169

170170
### From
@@ -254,7 +254,7 @@ email.getSMTPAPI();
254254
```java
255255
email.addSmtpApiTo("foo@example.com");
256256
// or
257-
email.addSmtpApiTo(["foo@other.com", "bar@other.com"]);
257+
email.addSmtpApiTo(new String[]{"foo@other.com", "bar@other.com"});
258258
```
259259

260260
### [Substitutions](http://sendgrid.com/docs/API_Reference/SMTP_API/substitution_tags.html)
@@ -270,7 +270,7 @@ JSONObject subs = header.getSubstitutions();
270270
#### setSubstitutions
271271

272272
```java
273-
email.setSubstitutions("key", ["value1", "value2"]);
273+
email.setSubstitutions("key", new String[]{"value1", "value2"});
274274

275275
JSONObject subs = header.getSubstitutions();
276276
```

0 commit comments

Comments
 (0)